def path(graph, source, target, excluded_edges=None, ooc_types=ooc_types):
    """ Path of functions between two types """
    if not isinstance(source, type):
        source = type(source)
    if not isinstance(target, type):
        target = type(target)

    if graph not in source:
        for cls in valid_subclasses:
            if issubclass(source, cls):
                source = cls
                break

    # If both source and target are Out-Of-Core types then restrict ourselves
    # to the graph of out-of-core types
    if ooc_types:
        oocs = tuple(ooc_types)
        if issubclass(source, oocs) and issubclass(target, oocs):
            graph = graph.subgraph([n for n in graph.nodes()
                                    if issubclass(n, oocs)])
    with without_edges(graph, excluded_edges) as g:
        pth = nx.shortest_path(g, source=source, target=target, weight='cost')
        result = [(src, tgt, graph.edge[src][tgt]['func'])
                  for src, tgt in zip(pth, pth[1:])]
    return result


# Catch-all subclasses
dataset/ETHPy150Open blaze/odo/odo/core.py/path/swapped operands of `not in`