<｜begin▁of▁sentence｜>### Instruction:
Given two graphs, G1 with nodes (1, { 'color': 'red' }), (2, { 'color': 'green' }) and an edge (1, 2), and G2 with nodes (3, { 'color': 'red' }), (4, { 'color': 'green' }) and an edge (3, 4), how would you determine if G1 and G2 are isomorphic considering their 'color' attribute using NetworkX?
### Response:
import networkx as nx

# Create two graphs
G1 = nx.Graph()
G2 = nx.Graph()

# Add nodes and edges to the first graph
G1.add_nodes_from([(1, {'color': 'red'}), (2, {'color': 'green'})])
G1.add_edges_from([(1, 2)])

# Add nodes and edges to the second graph
G2.add_nodes_from([(3, {'color': 'red'}), (4, {'color': 'green'})])
G2.add_edges_from([(3, 4)])

# Attempt to find an isomorphism considering the 'color' attribute
mapping = nx.algorithms.isomorphism.vf2pp_isomorphism(G1, G2, node_label='color')

if mapping:
    print('The graphs are isomorphic with the following mapping:', mapping)
else:
    print('The graphs are not isomorphic')
<|EOT|>
