def create_tagging_decorator(tag_name):
    """
    Creates a new decorator which adds arbitrary tags to the decorated functions and methods, enabling these to be listed in a registry
    :param tag_name:
    :return:
    """

    def tagging_decorator(*args, **kwargs):
        # here we can receive the parameters handed over on the decorator (@decorator(a=b))
        def wrapper(method):
            method.member_tag = (tag_name, {'args': args, 'kwargs': kwargs})
            return method

        return wrapper

    return tagging_decorator