code: def _auto_decode(data):
      
      assert isinstance(data, six.binary_type)
  
      for e in ENCODINGS:
          try:
              return data.decode(e), e
          except UnicodeDecodeError:
              pass
  
      return data.decode('utf-8', 'ignore')
docs: Decode bytes. Return a (text, encoding) tuple.