code: def guess_format(text):
      
      format = 'yang'
      i = 0
      while i < len(text) and text[i].isspace():
          i += 1
      if i < len(text):
          if text[i] == '<':
              format = 'yin'
      return format
docs: Guess YANG/YIN format
  
      If the first non-whitespace character is '<' then it is XML.
      Return 'yang' or 'yin