def get_nodes(node_label, data=False):
    """Generate query returning ids of all nodes of the graph.

    Parameters
    ----------
    label
        Label of the nodes to match, default is 'node'
    """
    if data:
        query = (
            'MATCH (n:{}) RETURN n.id as node_id, properties(n) as attrs\n'
            .format(node_label))
    else:
        query = 'MATCH (n:{}) RETURN n.id as node_id\n'.format(node_label)
    return query
