def get_neighbors(graph, n, center):
    """Get the neighbors of a networkx graph"""
    nodes = set([center])
    for i in range(n):
        for n in nodes:
            nodes = nodes.union(set(graph.neighbors(n)))
    return nodes
