class_docstr: Class which stores batches of images from the dataset.
class_docstr_tok: ["Class","which","stores","batches","of","images","from","the","dataset","."]
docstr: Initializes dataset batches from the list of images in the datastore.
  
  Args:
    batch_size: batch size
    allowed_epsilon: list of allowed epsilon or None to use default
    skip_image_ids: list of image ids to skip
    max_num_images: maximum number of images to read
docstr_tok: ["Initializes","dataset","batches","from","the","list","of","images","in","the","datastore",".","Args",":","batch_size",":","batch","size","allowed_epsilon",":","list","of","allowed","epsilon","or","None","to","use","default","skip_image_ids",":","list","of","image","ids","to","skip","max_num_images",":","maximum","number","of","images","to","read"]
code: def init_from_storage_write_to_datastore(
      self,
      batch_size=100,
      allowed_epsilon=None,
      skip_image_ids=None,
      max_num_images=None,
  ):
      """Initializes dataset batches from the list of images in the datastore.
  
      Args:
        batch_size: batch size
        allowed_epsilon: list of allowed epsilon or None to use default
        skip_image_ids: list of image ids to skip
        max_num_images: maximum number of images to read
      """
      if allowed_epsilon is None:
          allowed_epsilon = copy.copy(DEFAULT_EPSILON)
      # init dataset batches from data in storage
      self._dataset_batches = {}
      # read all blob names from storage
      images = self._read_image_list(skip_image_ids)
      if max_num_images:
          images = images[:max_num_images]
      for batch_idx, batch_start in enumerate(
          range(0, len(images), batch_size)
      ):
          batch = images[batch_start : batch_start + batch_size]
          batch_id = DATASET_BATCH_ID_PATTERN.format(batch_idx)
          batch_epsilon = allowed_epsilon[
              batch_idx % len(allowed_epsilon)
          ]
          self.add_batch(batch_id, {"epsilon": batch_epsilon})
          for image_id, image_path in batch:
              self.add_image(
                  batch_id,
                  image_id,
                  {
                      "dataset_image_id": os.path.basename(image_path)[
                          :-4
                      ],
                      "image_path": image_path,
                  },
              )
      # write data to datastore
      self.write_to_datastore()
  
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 3 for calling the DatasetBatches obj's underlying member method code with example usage: obj.init_from_storage_write_to_datastore(batch_size, allowed_epsilon, skip_image_ids, max_num_images) without return types