<s>[INST] I'm making a relation graph for a personal project. This graph will be used to show the relationship between different concepts. For the graph, I'll be using nodes and edges. 

The nodes will represent the concepts and the edges will represent the relationships between the concepts. Since the relationships can be one way (A to B) or bidirectional (A to B and B to A), it should be possible to store this information. 

Also, you should be able to find the shortest path from one concept to another.

How would you implement this in Python?[/INST]