Constructs the headers to use for the request.

        :param api_key: Your Postmark API key. Defaults to `None`.
        :param test: Use the Postmark test API. Defaults to `self.test`.
        :param request_args: Keyword args to pass to :func:`requests.request`.
            Defaults to `None`.
        :rtype: `dict` of header values.

def _get_headers(self, api_key=None, test=None, request_args=None):
        '''Constructs the headers to use for the request.

        :param api_key: Your Postmark API key. Defaults to `None`.
        :param test: Use the Postmark test API. Defaults to `self.test`.
        :param request_args: Keyword args to pass to :func:`requests.request`.
            Defaults to `None`.
        :rtype: `dict` of header values.
        '''
        if request_args is None:
            request_args = {}
        headers = {}
        headers.update(self._headers)
        headers.update(request_args.pop('headers', {}))
        if (test is None and self.test) or test:
            headers[self._api_key_header_name] = POSTMARK_API_TEST_KEY
        elif api_key is not None:
            headers[self._api_key_header_name] = api_key
        else:
            headers[self._api_key_header_name] = self.api_key
        if not headers.get(self._api_key_header_name):
            raise ValueError('Postmark API Key not provided')
        return headers