import itertools


def _args_as_string(args, kwargs):
    """Convert args and kwargs to a printable string."""
    return '(' + ', '.join(itertools.chain(
        (repr(a) for a in args),
        (f"{k}={v!r}" for k, v in kwargs.items()))) + ')'