code: def _python2_bz2open(fn, mode, encoding, newline):
      """Wrapper to open bz2 in text mode.
  
      Parameters
      ----------
      fn : str
          File name
      mode : {'r', 'w'}
          File mode. Note that bz2 Text files are not supported.
      encoding : str
          Ignored, text bz2 files not supported in Python2.
      newline : str
          Ignored, text bz2 files not supported in Python2.
      """
      import bz2
  
      _check_mode(mode, encoding, newline)
  
      if "t" in mode:
          # BZ2File is missing necessary functions for TextIOWrapper
          warnings.warn(
              "Assuming latin1 encoding for bz2 text file in Python2",
              RuntimeWarning,
              stacklevel=5,
          )
          mode = mode.replace("t", "")
      return bz2.BZ2File(fn, mode)
  
imports: from __future__ import division, absolute_import, print_function
  import os
  import sys
  import warnings
  import shutil
  import io
  from numpy.core.overrides import set_module
label_desc: Use image node_id 2 for calling a global function with example usage: _python2_bz2open(fn, mode, encoding, newline) and returns: bz2