def METHOD_NAME(self, get_components):
    DG = nx.path_graph(5, create_using=nx.DiGraph)
    G = nx.disjoint_union(DG, DG)
    seen = set()
    for component in get_components(G):
        assert len(seen & component) == 0
        seen.update(component)
        component.clear()