code: def _buffered_read_file(fobj):
      """Return a buffered version of a read file object."""
      if PY26 or (PY27 and isinstance(fobj, bz2.BZ2File)):
          # Python 2.6 doesn't fully support io.BufferedReader.
          # Python 2.7 doesn't work with BZ2File through a buffer: "no
          # attribute 'readable'" error.
          return fobj
      else:
          return io.BufferedReader(fobj, buffer_size=_IO_BUFFER_SIZE)
  
imports: import pickle
  import sys
  import io
  import zlib
  import gzip
  import bz2
  import warnings
  import contextlib
  from contextlib import closing
  from ._compat import PY3_OR_LATER, PY26, PY27, _basestring
label_desc: Use image node_id 2 for calling a global function with example usage: _buffered_read_file(fobj) and returns: fobj, io