def get_frames(ctx, args, incomplete):
    """
    Return all matching frame IDs

    This function returns all frame IDs that match the given prefix in a
    generator. If no ID matches the prefix, it returns the empty generator.
    """
    watson = _bypass_click_bug_to_ensure_watson(ctx)

    for cur_frame in watson.frames:
        yield_candidate = cur_frame.id
        if yield_candidate.startswith(incomplete):
            yield yield_candidate

    Return all matching frame IDs

    This function returns all frame IDs that match the given prefix in a
    generator. If no ID matches the prefix, it returns the empty generator.
    
watson/autocompletion.py