human
I wrote the below code

    if (source not in G):
        raise nx.NodeNotFound('Source    {}    not    in    G'.format(source))
    def join(p1, p2):
        return (p1 + p2)
    if (cutoff is None):
        cutoff = float('inf')
    nextlevel = {source: 1}
    paths = {source: [source]}
    return _single_shortest_path(G.adj, nextlevel, paths, cutoff, join)

What's a good function header?

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

def single_source_shortest_path(G, source, cutoff=None):