code: def __len__(self):
      return int(np.ceil(float(len(self.instances)) / self.batch_size))
  
file_path: ImageAI/imageai_tf_deprecated/Detection/Custom/generator.py
imports: import cv2
  import copy
  import numpy
  from tensorflow.keras.utils import Sequence
  from imageai.Detection.Custom.utils.bbox import BoundBox, bbox_iou
  from imageai.Detection.Custom.utils.image import apply_random_scale_and_crop, random_distort_image, random_flip, correct_bounding_boxes
label_desc: Use image node_id 2 for calling the BatchGenerator obj's underlying member method code with example usage: obj.__len__() and returns: int