<｜begin▁of▁sentence｜>### Instruction:
Given a file 'path_to_dot_file.dot' in DOT (graph description language) format containing a directed multigraph, how can you load this graph using NetworkX and print its edges and nodes?
### Response:
import networkx as nx

# Read Graph from .dot file
G = nx.MultiDiGraph(nx.nx_pydot.read_dot('path_to_dot_file.dot'))

# If you want a simple Graph instead of a MultiGraph
# G = nx.Graph(nx.nx_pydot.read_dot('path_to_dot_file.dot'))

print(G.edges())
print(G.nodes())
<|EOT|>
