def _get_headers(self, auth_required: bool = False) -> dict:
        """
        Return default headers for HTTP requests.

        If auth_required is True or the client is hosted, includes an Authorization header.
        """
        headers = {"Accept": "application/json"}
        if auth_required or self._is_hosted:
            headers["Authorization"] = f"Bearer {self._api_key}"
        return headers

        Return default headers for HTTP requests.

        If auth_required is True or the client is hosted, includes an Authorization header.
        
llama-index-integrations/postprocessor/llama-index-postprocessor-nvidia-rerank/llama_index/postprocessor/nvidia_rerank/base.py