def METHOD_NAME(verb, group, version, resource, namespace=None,
                        subresource=None):
    """
    This function will serve as a decorator. It will be used to make sure that
    the decorated function is authorized to perform the corresponding k8s api
    verb on a specific resource.
    """
    def wrapper(func):
        @functools.wraps(func)
        def runner(*args, **kwargs):
            # Run the decorated function only if the user is authorized
            ensure_authorized(verb, group, version, resource,
                              namespace=namespace, subresource=subresource)
            return func(*args, **kwargs)
        return runner
    return wrapper