def handle_arguments(**mapping):
    """
    Decorator that will remap keyword arguments.
    Useful to support maya "short" and "long" form for function arguments.
    ex: `cmds.ls(selection=True)` and `cmds.ls(sl=True)` are equivalent.

    :param mapping: A mapping of argument short name by their long name.
    :type mapping: dict[str, str]
    :return: A decorated function
    :rtype: callable
    """

    def _deco(func):
        def _wrapper(*args, **kwargs):
            kwargs_conformed = {}
            for attr, alias in mapping.items():
                if attr in kwargs:
                    kwargs_conformed[attr] = kwargs.pop(attr)
                if alias in kwargs:
                    kwargs_conformed[attr] = kwargs.pop(alias)

            if kwargs:
                raise NotImplementedError(
                    "Not implemented keyword argument{s}: {keys}".format(
                        s="s" if len(kwargs) > 1 else "", keys=", ".join(kwargs.keys())
                    )
                )

            return func(*args, **kwargs_conformed)

        return _wrapper

    return _deco