<｜begin▁of▁sentence｜>### Instruction:
Given two graphs G1 and G2 with the following node attributes: G1 has nodes 1 and 2 with colors 'red' and 'blue' respectively, and G2 has nodes 1 and 2 with colors 'red' and 'blue' respectively. Can you compare the node sets of G1 and G2 to determine if they are equal considering their node attributes as well?
### Response:
import networkx as nx

# Create two graphs
G1 = nx.Graph()
G1.add_node(1, color='red')
G1.add_node(2, color='blue')

G2 = nx.Graph()
G2.add_node(1, color='red')
G2.add_node(2, color='blue')

# Check if the nodes of the graphs are equal
are_equal = nx.algorithms.isomorphism.nodes_equal(G1.nodes(data=True), G2.nodes(data=True))

print('The nodes of G1 and G2 are equal:', are_equal)
<|EOT|>
