Return a copy of the graph G with all the data removed

def create_copy_without_data(G):
    """Return a copy of the graph G with all the data removed"""
    H = nx.Graph()
    for i in H.nodes_iter():
        H.node[i] = {}
    return H