code: def _get_all_headers(self, method, endpoint, request_bytes, custom_headers):
          
  
          headers = self._get_default_headers()
          headers.update(custom_headers)
  
          if self._api_context.token is not None:
              headers[self.HEADER_AUTHENTICATION] = self._api_context.token
              headers[self.HEADER_SIGNATURE] = security.sign_request(
                  self._api_context.installation_context.private_key_client,
                  method,
                  endpoint,
                  request_bytes,
                  headers
              )
  
          return headers
docs: :type method: str
          :type endpoint: str
          :type request_bytes: bytes
          :type custom_headers: dict[str, str]
  
          :rtype: dict[str, str]