def METHOD_NAME(
    graph: "DiGraph",
    stages: Optional[List["T"]] = None,
    pipeline: bool = False,
    downstream: bool = False,
) -> List["T"]:
    r"""Derive the evaluation of the given node for the given graph.
    When you _reproduce a stage_, you want to _evaluate the descendants_
    to know if it make sense to _recompute_ it. A post-ordered search
    will give us an order list of the nodes we want.
    For example, let's say that we have the following pipeline:
                               E
                              / \
                             D   F
                            / \   \
                           B   C   G
                            \ /
                             A
    The derived evaluation of D would be: [A, B, C, D]
    In case that `downstream` option is specified, the desired effect
    is to derive the evaluation starting from the given stage up to the
    ancestors. However, the `networkx.ancestors` returns a set, without
    any guarantee of any order, so we are going to reverse the graph and
    use a reverse post-ordered search using the given stage as a starting
    point.
                   E                                   A
                  / \                                 / \
                 D   F                               B   C   G
                / \   \        --- reverse -->        \ /   /
               B   C   G                               D   F
                \ /                                     \ /
                 A                                       E
    The derived evaluation of _downstream_ B would be: [B, D, E]
    """
    import networkx as nx
    sub = get_subgraph(graph, stages, pipeline=pipeline, downstream=downstream)
    return list(nx.dfs_postorder_nodes(sub))