code: def auto_type(s):
      
      if isinstance(s, bool):
          return s
      elif s is None:
          return ''
      elif s == 'TRUE':
          return True
      elif s == 'FALSE':
          return False
      else:
          try:
              try:
                  # telephone numbers may be wrongly interpretted as ints
                  if s.startswith('+'):
                      return s
                  else:
                      return int(s)
              except ValueError:
                  return float(s)
  
          except ValueError:
              return s
docs: Get a XML response and tries to convert it to Python base object