<｜begin▁of▁sentence｜>### Instruction:
Given two graph objects, 'G' with edges [(0, 1), (0, 2), (1, 2)] and 'H' with edges [(0, 1), (0, 3), (1, 3), (1, 2)], how do you combine these graphs into a single union graph while resolving overlapping node names by prefixing the names from 'G' with 'G-' and from 'H' with 'H-'?
### Response:
import networkx as nx

# Create two graphs G and H with some overlapping node names
G = nx.Graph([(0, 1), (0, 2), (1, 2)])
H = nx.Graph([(0, 1), (0, 3), (1, 3), (1, 2)])

# Use rename argument to handle overlapping node names
U = nx.union(G, H, rename=('G-', 'H-'))

print(f'Nodes in the union graph: {U.nodes()}')
print(f'Edges in the union graph: {U.edges()}')
<|EOT|>
