import pprint


def fargs(*args, **kwargs):
    """
    Format `*args` and `**kwargs` into one string resembling the original call.

    >>> fargs(1, [2], x=3.0, y='four')
    "1, [2], x=3.0, y='four'"

    .. note:: The items of `**kwargs` are sorted by their key.
    """

    items = []
    for arg in args:
        items.append(pprint.pformat(arg))
    for kw in sorted(kwargs):
        items.append(kw + "=" + pprint.pformat(kwargs[kw]))
    return ", ".join(items)