import itertools


def is_simplicial(G, n):
    """Determines whether a node n in G is simplicial.

    Parameters
    ----------
    G : NetworkX graph
        The graph on which to check whether node n is simplicial.
    n : node
        A node in graph G.

    Returns
    -------
    is_simplicial : bool
        True if its neighbors form a clique.

    Examples
    --------
    This example checks whether node 0 is simplicial for two graphs: G, a
    single Chimera unit cell, which is bipartite, and K_5, the :math:`K_5`
    complete graph.

    >>> G = dnx.chimera_graph(1, 1, 4)
    >>> K_5 = nx.complete_graph(5)
    >>> dnx.is_simplicial(G, 0)
    False
    >>> dnx.is_simplicial(K_5, 0)
    True

    """
    return all(u in G[v] for u, v in itertools.combinations(G[n], 2))