class_docstr: Class which stores batches of images from the dataset.
class_docstr_tok: ["Class","which","stores","batches","of","images","from","the","dataset","."]
docstr: Reads list of dataset images from the datastore.
docstr_tok: ["Reads","list","of","dataset","images","from","the","datastore","."]
code: def _read_image_list(self, skip_image_ids=None):
      """Reads list of dataset images from the datastore."""
      if skip_image_ids is None:
          skip_image_ids = []
      images = self._storage_client.list_blobs(
          prefix=os.path.join("dataset", self._dataset_name) + "/"
      )
      zip_files = [i for i in images if i.endswith(".zip")]
      if len(zip_files) == 1:
          # we have a zip archive with images
          zip_name = zip_files[0]
          logging.info(
              "Reading list of images from zip file %s", zip_name
          )
          blob = self._storage_client.get_blob(zip_name)
          buf = BytesIO()
          logging.info("Downloading zip")
          blob.download_to_file(buf)
          buf.seek(0)
          logging.info("Reading content of the zip")
          with zipfile.ZipFile(buf) as f:
              images = [
                  os.path.join(zip_name, os.path.basename(n))
                  for n in f.namelist()
                  if n.endswith(".png")
              ]
          buf.close()
          logging.info("Found %d images", len(images))
      else:
          # we have just a directory with images, filter non-PNG files
          logging.info(
              "Reading list of images from png files in storage"
          )
          images = [i for i in images if i.endswith(".png")]
          logging.info("Found %d images", len(images))
      # filter images which should be skipped
      images = [
          i
          for i in images
          if os.path.basename(i)[:-4] not in skip_image_ids
      ]
      # assign IDs to images
      images = [
          (DATASET_IMAGE_ID_PATTERN.format(idx), i)
          for idx, i in enumerate(sorted(images))
      ]
      return images
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  from io import BytesIO
  from io import StringIO
  import itertools
  import logging
  import os
  import zipfile
  from six import iteritems
  from six import iterkeys
  from six import itervalues
label_desc: Use image node_id 2 for calling the DatasetBatches obj's underlying member method code with example usage: obj._read_image_list(skip_image_ids) and returns: images