def _auto_decode(data):
    """
    Decode bytes. Return a (text, encoding) tuple.
    """
    assert isinstance(data, six.binary_type)

    for e in ENCODINGS:
        try:
            return data.decode(e), e
        except __HOLE__:
            pass

    return data.decode('utf-8', 'ignore')
dataset/ETHPy150Open jonathanslenders/pyvim/pyvim/io/backends.py/_auto_decode