human
I wrote the below code

    path_to = {src: None}
    def dfs(x):
        if dst_predicate(x):
            return x
        x_op = _as_op(x)
        for y in (x_op.control_inputs + list(x_op.inputs)):
            if (y not in path_to):
                path_to[y] = x
                res = dfs(y)
                if (res is not None):
                    return res
        return None
    dst = dfs(src)
    path = []
    while (dst in path_to):
        path.append(dst)
        dst = path_to[dst]
    return list(reversed(path))

What's a good function header?
assistant
#Here's a good function header.

def _find_input_path(src, dst_predicate):