<｜begin▁of▁sentence｜>### Instruction:
Given two graphs, G with an edge ('A', 'B') having a weight of 2.0 and an unconnected node 'C' with color 'blue', and another graph H with edges ('A', 'B') having a weight of 10.0, and ('B', 'C') having a weight of 3.0, and a node 'A' with color 'red', how do you compose these two graphs using NetworkX such that the result gives preference to H's attributes, and what would be the resulting composed graph?
### Response:
import networkx as nx

# Create two graphs
G = nx.Graph()
G.add_edge('A', 'B', weight=2.0)
G.add_node('C', color='blue')

H = nx.Graph()
H.add_edge('A', 'B', weight=10.0)
H.add_edge('B', 'C', weight=3.0)
H.add_node('A', color='red')

# Compose G and H
R = nx.compose(G, H)

# Print composed graph
print('Nodes:', R.nodes(data=True))
print('Edges:', R.edges(data=True))
<|EOT|>
