code: def _is_fromfile_compatible(stream):
      """
      Check whether `stream` is compatible with numpy.fromfile.
  
      Passing a gzipped file object to ``fromfile/fromstring`` doesn't work with
      Python3.
      """
      if sys.version_info[0] < 3:
          return True
  
      bad_cls = []
      try:
          import gzip
  
          bad_cls.append(gzip.GzipFile)
      except ImportError:
          pass
      try:
          import bz2
  
          bad_cls.append(bz2.BZ2File)
      except ImportError:
          pass
  
      bad_cls = tuple(bad_cls)
      return not isinstance(stream, bad_cls)
  
imports: from __future__ import division, print_function, absolute_import
  import os
  import sys
  from numpy import asarray, real, imag, conj, zeros, ndarray, concatenate, ones, can_cast
  from numpy.compat import asbytes, asstr
  from scipy._lib.six import string_types
  from scipy.sparse import coo_matrix, isspmatrix
label_desc: Use image node_id 4 for calling a global function with example usage: _is_fromfile_compatible(stream) and returns: unknown, True