code: def to_tag(self) -> str:
          
          if self._str_tag is not None:
              return self._str_tag
          subtags = ['und']
          if self.language:
              subtags[0] = self.language
          if self.extlangs:
              for extlang in sorted(self.extlangs):
                  subtags.append(extlang)
          if self.script:
              subtags.append(self.script)
          if self.region:
              subtags.append(self.region)
          if self.variants:
              for variant in sorted(self.variants):
                  subtags.append(variant)
          if self.extensions:
              for ext in self.extensions:
                  subtags.append(ext)
          if self.private:
              subtags.append(self.private)
          self._str_tag = '-'.join(subtags)
          return self._str_tag
docs: Convert a Language back to a standard language tag, as a string.
          This is also the str() representation of a Language object.
  
          >>> Language.make(language='en', region='GB').to_tag()
          'en-GB'
  
          >>> Language.make(language='yue', script='Hant', region='HK').to_tag()
          'yue-Hant-HK'
  
          >>> Language.make(script='Arab').to_tag()
          'und-Arab'
  
          >>> str(Language.make(region='IN'))
          'und-IN'