code: def _sign(self, rel_url, access_key=None, secret_key=None, hash_type=None):
          '''
          Calculates the signature of the given request and adds the
          Authorization HTTP header.
          It should be called at the very end of request preparation and before
          sending the request to the server.
          '''
          if access_key is None:
              access_key = self.config.access_key
          if secret_key is None:
              secret_key = self.config.secret_key
          if hash_type is None:
              hash_type = self.config.hash_type
          hdrs, _ = generate_signature(
              self.method, self.config.version, self.config.endpoint,
              self.date, str(rel_url), self.content_type, self._content,
              access_key, secret_key, hash_type)
          self.headers.update(hdrsf _sign(self, rel_url, access_key=None, secret_key=None, hash_type=None):
          '''
          Calculates the signature of the given request and adds the
          Authorization HTTP header.
          It should be called at the very end of request preparation and before
          sending the request to the server.
          '''
          if access_key is None:
              access_key = self.config.access_key
          if secret_key is None:
              secret_key = self.config.secret_key
          if hash_type is None:
              hash_type = self.config.hash_type
          hdrs, _ = generate_signature(
              self.method, self.config.version, self.config.endpoint,
              self.date, str(rel_url), self.content_type, self._content,
              access_key, secret_key, hash_type)
          self.headers.update(hdrs)
docs: Calculates the signature of the given request and adds the
          Authorization HTTP header.
          It should be called at the very end of request preparation and before
          sending the request to the server.