def translate(self, text: str, language: str):
        """
        Use this tool to translate text from one language to another.
        The source language will be automatically detected. You need to specify the target language
        using a two character language code.

        Args:
            language (str): Target translation language.

        """
        request = requests.post(
            ENDPOINT_BASE_URL,
            params={"api-version": "3.0", "to": language},
            headers=self.headers,
            json=[{"text": text}],
        )
        return request.json()

        Use this tool to translate text from one language to another.
        The source language will be automatically detected. You need to specify the target language
        using a two character language code.

        Args:
            language (str): Target translation language.

        
llama-index-integrations/tools/llama-index-tools-azure-translate/llama_index/tools/azure_translate/base.py