human
I wrote the below code

    if (not (G.is_multigraph() == H.is_multigraph())):
        raise nx.NetworkXError('G    and    H    must    both    be    graphs    or    multigraphs.')
    R = G.__class__()
    if (name is None):
        name = ('union(    %s,    %s    )' % (G.name, H.name))
    R.name = name
    def add_prefix(graph, prefix):
        if (prefix is None):
            return graph
        def label(x):
            if is_string_like(x):
                name = (prefix + x)
            else:
                name = (prefix + repr(x))
            return name
        return nx.relabel_nodes(graph, label)
    G = add_prefix(G, rename[0])
    H = add_prefix(H, rename[1])
    if (set(G) & set(H)):
        raise nx.NetworkXError('The    node    sets    of    G    and    H    are    not    disjoint.', 'Use    appropriate    rename=(Gprefix,Hprefix)or    use    disjoint_union(G,H).')
    if G.is_multigraph():
        G_edges = G.edges(keys=True, data=True)
    else:
        G_edges = G.edges(data=True)
    if H.is_multigraph():
        H_edges = H.edges(keys=True, data=True)
    else:
        H_edges = H.edges(data=True)
    R.add_nodes_from(G)
    R.add_edges_from(G_edges)
    R.add_nodes_from(H)
    R.add_edges_from(H_edges)
    for n in G:
        R.node[n].update(G.node[n])
    for n in H:
        R.node[n].update(H.node[n])
    R.graph.update(G.graph)
    R.graph.update(H.graph)
    return R

What's a good function header?
 ... Give me a Python program to fix is None):?
assistant
#Here is Python program to fix is None):
.

def union(G, H, rename=(None, None), name=None):