def generate_proper_headers(self, request_uri):
        """Condition for generating headers for refresh access key request or for all other requests."""
        if request_uri == MimecastEndpoints.refresh_access_key:
            headers = self.make_refresh_token_request_headers()
        else:
            headers = self.make_request_headers(request_uri)
            logging.info("URL: {0} Request ID: {1}".format(self.base_url + request_uri, headers['x-mc-req-id']))
        return headers
Condition for generating headers for refresh access key request or for all other requests.
Solutions/MimecastAudit/Data Connectors/Helpers/request_helper.py