<｜begin▁of▁sentence｜>### Instruction:
Given a dictionary of dictionaries where each top-level key represents a node with a sub-dictionary consisting of adjacent nodes and corresponding edge attributes, such as weights, how does the `from_dict_of_dicts` function create a NetworkX graph, and can you provide an example of its usage?
### Response:
import networkx as nx

# Dictionary of dictionaries representation
# Each key in the main dictionary represents a node.
# The value for each key is a dictionary where the
# keys are nodes it is connected to, and the values are the edge attributes.
dod = {0: {1: {'weight': 1}, 2: {'weight': 2}}, 1: {0: {'weight': 1}, 2: {'weight': 3}}, 2: {0: {'weight': 2}, 1: {'weight': 3}}}

# Create a graph from the dictionary of dictionaries
G = nx.from_dict_of_dicts(dod)

# Print the edges with attributes
print(G.edges(data=True))
<|EOT|>
