code: def read_file_list(file_or_fd):
      """Read a file list from a file or file object
  
      file_or_fd - either a path string or a file-like object
  
      Returns a collection of urls
  
      The unicode text for each field is utf-8 encoded, then string_escape encoded.
      All fields are delimited by quotes and separated by commas. A "None" value is
      represented by two consecutive commas. The series, index, and channel
      are no longer set, so the URL is followed by three commas.
  
      There are two header lines. The first header line has key/value pairs.
      Required key/value pairs are "Version" and "PlaneCount". "Version" is
      the format version. "PlaneCount" is the number of image planes to be
      read or saved.
  
      The second header line is legacy at this point - it used to specify
      a particular image plane in the file, but doesn't do that any longer.
  
      A minimal example:
  
      "Version":"1","PlaneCount":"1"
      "URL","Series","Index","Channel"
      "file:///imaging/analysis/singleplane.tif",,,
      """
  
      if isinstance(file_or_fd, str):
          needs_close = True
          fd = open(file_or_fd, "r")
      else:
          needs_close = False
          fd = file_or_fd
      try:
          line = next(fd)
          properties = dict(read_fields(line))
          if "Version" not in properties:
              raise ValueError(
                  "Image plane details header is missing its version #"
              )
          version = int(properties["Version"])
          if version != IMAGE_PLANE_DESCRIPTOR_VERSION:
              raise ValueError(
                  "Unable to read image plane details version # %d"
                  % version
              )
          plane_count = int(properties[H_PLANE_COUNT])
          header = read_fields(next(fd))
          result = []
          pattern = r'(?:"((?:[^\\]|\\.)+?)")?(?:,|\s+)'
          for i in range(plane_count):
              fields = [
                  x.groups()[0] for x in re.finditer(pattern, next(fd))
              ]
              fields = [None if x is None else x for x in fields]
              url = fields[0]
              result.append(url)
          return result
      finally:
          if needs_close:
              fd.close()
  
imports: import bisect
  import re
  import numpy
  from ...constants.pipeline import make_cell_struct_dtype
  from ...constants.pipeline import PIPELINE
  from ...constants.pipeline import IMAGE_PLANE_DESCRIPTOR_VERSION
  from ...constants.pipeline import H_PLANE_COUNT
  from ...constants.pipeline import H_URL
  from ...constants.pipeline import H_SERIES
  from ...constants.pipeline import H_INDEX
  from ...constants.pipeline import H_CHANNEL
  from ...constants.pipeline import RF_STATE_PREQUOTE
  from ...constants.pipeline import RF_STATE_FIELD
  from ...constants.pipeline import RF_STATE_BACKSLASH_ESCAPE
  from ...constants.pipeline import RF_STATE_SEPARATOR
  from ..legacy import cmp
label_desc: Use image node_id 3 for calling a global function with example usage: read_file_list(file_or_fd) and returns: result