def order(subgraph):
    """ Return the number of unique nodes in a subgraph.

    :arg subgraph:
    :return:
    """
    try:
        return subgraph.__order__()
    except AttributeError:
        try:
            return len(set(subgraph.nodes()))
        except __HOLE__:
            raise TypeError("Object %r is not graphy")
dataset/ETHPy150Open nigelsmall/py2neo/py2neo/types.py/order