code: def _read_image_as_array(path, dtype):
      f = Image.open(path)
      try:
          image = numpy.asarray(f, dtype=dtype)
      finally:
          # Only pillow >= 3.0 has 'close' method
          if hasattr(f, "close"):
              f.close()
      return image
  
imports: import bisect
  import io
  import os
  import threading
  import zipfile
  import numpy
  import six
  import chainer
  from chainer.dataset import dataset_mixin
label_desc: Use image node_id 1 for calling a global function with example usage: _read_image_as_array(path, dtype) and returns: image