code: def _get_default_language(self):
          
  
          assert hasattr(self, 'available_languages'), \
              'No available languages have been generated.'
          assert len(self.available_languages) > 0, \
              'No available languages to select from.'
  
          if (
              settings.DEFAULT_LANGUAGE and
              settings.DEFAULT_LANGUAGE in self.available_languages
          ) or (
              'language_code' not in self.form.base_fields
          ):
              # Default language still available
  
              self.available_languages.remove(settings.DEFAULT_LANGUAGE)
              return settings.DEFAULT_LANGUAGE
  
          else:
              # Select the first item and return it
              return self.available_languages.pop(0)
docs: If a default language has been set, and is still available in
          `self.available_languages`, return it and remove it from the list.
  
          If not, simply pop the first available language.