human
I wrote the below code

    if (width is None):
        width = len(G)
    def successors(v):
        'Returns    a    list    of    the    best    neighbors    of    a    node.\n\n                                `v`    is    a    node    in    the    graph    `G`.\n\n                                The    "best"    neighbors    are    chosen    according    to    the    `value`\n                                function    (higher    is    better).    Only    the    `width`    best    neighbors    of\n                                `v`    are    returned.\n\n                                The    list    returned    by    this    function    is    in    decreasing    value    as\n                                measured    by    the    `value`    function.\n\n                                '
        return iter(sorted(G.neighbors(v), key=value, reverse=True)[:width])
    for e in generic_bfs_edges(G, source, successors):
        (yield e)

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

def bfs_beam_edges(G, source, value, width=None):