Decorator that converts Issue and Project resources to their keys when used as arguments.

def translate_resource_args(func):
    """Decorator that converts Issue and Project resources to their keys when used as arguments."""
    @wraps(func)
    def wrapper(*args, **kwargs):
        """
        :type args: *Any
        :type kwargs: **Any
        :return: Any
        """
        arg_list = []
        for arg in args:
            if isinstance(arg, (Issue, Project)):
                arg_list.append(arg.key)
            else:
                arg_list.append(arg)
        result = func(*arg_list, **kwargs)
        return result

    return wrapper