def _find_paths(graph, root_node, n_transitions):
    """ Returns a list of paths with n_transitions transitions from root node

    graph: Is the nx.Graph object which contains the (V, E) graph
    root_node: it is the node from which we start
    n_transitions: is the number of transitions
    """

    # recursion base case
    if n_transitions == 0:
        return [[root_node]]

    paths = []
    for neighbor in graph.successors(root_node):

        # recursive step
        for path in _find_paths(graph, neighbor, n_transitions - 1):
            paths.append([root_node] + path)

    return paths