code: def _switch_language(self, lang):
          
          data = {"learning_language": lang}
          url = "https://www.duolingo.com/switch_language"
          request = self._make_req(url, data)
  
          try:
              parse = request.json()['tracking_properties']
              if parse['learning_language'] == lang:
                  self.user_data = Struct(**self._get_data())
          except:
              raise Exception('Failed to switch language')
docs: Change the learned language with
          ``https://www.duolingo.com/switch_language``.
  
          :param lang: Wanted language abbreviation (example: ``'fr'``)
          :type lang: str