def METHOD_NAME(self, text: str, **kwargs) -> str:
    """
    function that uses microsoft translate to translate a text
    @param text: desired text to translate
    @return: str: translated text
    """
    # a body must be a list of dicts to process multiple texts;
    # I have not added multiple text processing here since it is covered by the translate_batch method
    response = None
    if is_input_valid(text):
        self._url_params["from"] = self._source
        self._url_params["to"] = self._target
        valid_microsoft_json = [{"text": text}]
        try:
            response = requests.post(
                self._base_url,
                params=self._url_params,
                headers=self.headers,
                json=valid_microsoft_json,
                proxies=self.proxies,
            )
        except requests.exceptions.RequestException:
            exc_type, value, traceback = sys.exc_info()
            logging.warning(f"Returned error: {exc_type.__name__}")
        # Where Microsoft API responds with an api error, it returns a dict in response.json()
        if type(response.json()) is dict:
            error_message = response.json()["error"]
            raise MicrosoftAPIerror(error_message)
        # Where it responds with a translation, its response.json() is a list
        # e.g. [{'translations': [{'text':'Hello world!', 'to': 'en'}]}]
        elif type(response.json()) is list:
            all_translations = [
                i["text"] for i in response.json()[0]["translations"]
            ]
            return "\n".join(all_translations)