def nx_delete_node_attr(graph, name, nodes=None):
    """
    Removes node attributes

    Doctest:
        >>> from utool.util_graph import *  # NOQA
        >>> import utool as ut
        >>> G = nx.karate_club_graph()
        >>> nx.set_node_attributes(G, name='foo', values='bar')
        >>> datas = nx.get_node_attributes(G, 'club')
        >>> assert len(nx.get_node_attributes(G, 'club')) == 34
        >>> assert len(nx.get_node_attributes(G, 'foo')) == 34
        >>> ut.nx_delete_node_attr(G, ['club', 'foo'], nodes=[1, 2])
        >>> assert len(nx.get_node_attributes(G, 'club')) == 32
        >>> assert len(nx.get_node_attributes(G, 'foo')) == 32
        >>> ut.nx_delete_node_attr(G, ['club'])
        >>> assert len(nx.get_node_attributes(G, 'club')) == 0
        >>> assert len(nx.get_node_attributes(G, 'foo')) == 32
    """
    if nodes is None:
        nodes = list(graph.nodes())
    removed = 0
    # names = [name] if not isinstance(name, list) else name
    node_dict = nx_node_dict(graph)

    if isinstance(name, list):
        for node in nodes:
            for name_ in name:
                try:
                    del node_dict[node][name_]
                    removed += 1
                except KeyError:
                    pass
    else:
        for node in nodes:
            try:
                del node_dict[node][name]
                removed += 1
            except KeyError:
                pass
    return removed
Removes node attributes

    Doctest:
        >>> from utool.util_graph import *  # NOQA
        >>> import utool as ut
        >>> G = nx.karate_club_graph()
        >>> nx.set_node_attributes(G, name='foo', values='bar')
        >>> datas = nx.get_node_attributes(G, 'club')
        >>> assert len(nx.get_node_attributes(G, 'club')) == 34
        >>> assert len(nx.get_node_attributes(G, 'foo')) == 34
        >>> ut.nx_delete_node_attr(G, ['club', 'foo'], nodes=[1, 2])
        >>> assert len(nx.get_node_attributes(G, 'club')) == 32
        >>> assert len(nx.get_node_attributes(G, 'foo')) == 32
        >>> ut.nx_delete_node_attr(G, ['club'])
        >>> assert len(nx.get_node_attributes(G, 'club')) == 0
        >>> assert len(nx.get_node_attributes(G, 'foo')) == 32