A decorator that converts a request header into a function parameter based on the specified field.

        :param str param_name: The parameter which receives the argument.
        :param Field field: The field class or instance used to deserialize the request header to a Python object.
        :return: A function

def from_header(self, param_name, field):
        """
        A decorator that converts a request header into a function parameter based on the specified field.

        :param str param_name: The parameter which receives the argument.
        :param Field field: The field class or instance used to deserialize the request header to a Python object.
        :return: A function
        """
        return self.__from_source(param_name, field, lambda: request.headers, 'header')