(handles=...)``, or *None*
        if that keyword argument was not used.
    labels
        The value of the keyword argument ``legend(labels=...)``, or *None*
        if that keyword argument was not used.
    **kwargs
        All other keyword arguments passed to ``legend()``.

    Returns
    -------
    handles : list of `.Artist`
        The legend handles.
    labels : list of str
        The legend labels.
    extra_args : tuple
        *args* with positional handles and labels removed.
    kwargs : dict
        *kwargs* with keywords handles and labels removed.

    r