code: def _open_text(fname, **kwargs):
      
      if PY3:
          kwargs.setdefault('encoding', ENCODING)
          kwargs.setdefault('errors', ENCODING_ERRS)
      return open(fname, "rt", **kwargs)
docs: On Python 3 opens a file in text mode by using fs encoding and
      a proper en/decoding errors handler.
      On Python 2 this is just an alias for open(name, 'rt').