nodes: 0, module; 1, function_definition; 2, function_name:frompng; 3, parameters; 4, block; 5, identifier:path; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, default_parameter; 13, default_parameter; 14, expression_statement; 15, import_from_statement; 16, function_definition; 17, return_statement; 18, identifier:ext; 19, string; 20, identifier:start; 21, None; 22, identifier:stop; 23, None; 24, identifier:recursive; 25, False; 26, identifier:npartitions; 27, None; 28, identifier:labels; 29, None; 30, identifier:engine; 31, None; 32, identifier:credentials; 33, None; 34, comment:"""
      Load images from PNG files.
  
      Parameters
      ----------
      path : str
          Path to data files or directory, specified as either a local filesystem path
          or in a URI-like format, including scheme. May include a single '*' wildcard character.
  
      ext : string, optional, default = 'tif'
          Extension required on data files to be loaded.
  
      start, stop : nonnegative int, optional, default = None
          Indices of the first and last-plus-one file to load, relative to the sorted
          filenames matching `path` and `ext`. Interpreted using python slice indexing conventions.
  
      recursive : boolean, optional, default = False
          If true, will recursively descend directories from path, loading all files
          with an extension matching 'ext'.
  
      npartitions : int, optional, default = None
          Number of partitions for computational engine,
          if None will use default for engine.
  
      labels : array, optional, default = None
          Labels for records. If provided, should be one-dimensional.
      """; 35, dotted_name; 36, dotted_name; 37, function_name:getarray; 38, parameters; 39, block; 40, call; 41, string_content:png; 42, identifier:scipy; 43, identifier:misc; 44, identifier:imread; 45, identifier:idx_buffer_filename; 46, expression_statement; 47, expression_statement; 48, expression_statement; 49, identifier:frompath; 50, argument_list; 51, assignment; 52, assignment; 53, yield; 54, identifier:path; 55, keyword_argument; 56, keyword_argument; 57, keyword_argument; 58, keyword_argument; 59, keyword_argument; 60, keyword_argument; 61, keyword_argument; 62, keyword_argument; 63, keyword_argument; 64, pattern_list; 65, identifier:idx_buffer_filename; 66, identifier:fbuf; 67, call; 68, expression_list; 69, identifier:accessor; 70, identifier:getarray; 71, identifier:ext; 72, identifier:ext; 73, identifier:start; 74, identifier:start; 75, identifier:stop; 76, identifier:stop; 77, identifier:recursive; 78, identifier:recursive; 79, identifier:npartitions; 80, identifier:npartitions; 81, identifier:labels; 82, identifier:labels; 83, identifier:engine; 84, identifier:engine; 85, identifier:credentials; 86, identifier:credentials; 87, identifier:idx; 88, identifier:buf; 89, identifier:_; 90, identifier:BytesIO; 91, argument_list; 92, tuple; 93, call; 94, identifier:buf; 95, identifier:idx; 96, identifier:imread; 97, argument_list; 98, identifier:fbuf
code: def frompng(path, ext='png', start=None, stop=None, recursive=False, npartitions=None, labels=None, engine=None, credentials=None):
      """
      Load images from PNG files.
  
      Parameters
      ----------
      path : str
          Path to data files or directory, specified as either a local filesystem path
          or in a URI-like format, including scheme. May include a single '*' wildcard character.
  
      ext : string, optional, default = 'tif'
          Extension required on data files to be loaded.
  
      start, stop : nonnegative int, optional, default = None
          Indices of the first and last-plus-one file to load, relative to the sorted
          filenames matching `path` and `ext`. Interpreted using python slice indexing conventions.
  
      recursive : boolean, optional, default = False
          If true, will recursively descend directories from path, loading all files
          with an extension matching 'ext'.
  
      npartitions : int, optional, default = None
          Number of partitions for computational engine,
          if None will use default for engine.
  
      labels : array, optional, default = None
          Labels for records. If provided, should be one-dimensional.
      """
      from scipy.misc import imread
  
      def getarray(idx_buffer_filename):
          idx, buf, _ = idx_buffer_filename
          fbuf = BytesIO(buf)
          yield (idx,), imread(fbuf)
  
      return frompath(path, accessor=getarray, ext=ext, start=start,
                      stop=stop, recursive=recursive, npartitions=npartitions,
                      labels=labels, engine=engine, credentials=credentials)