class_docstr: Abstract generator class.
      
docstr: Order the images according to self.order and makes groups of self.batch_size.
          
code: def group_images(self):
      """Order the images according to self.order and makes groups of self.batch_size."""
      # determine the order of the images
      order = list(range(self.size()))
      if self.group_method == "random":
          random.shuffle(order)
      elif self.group_method == "ratio":
          order.sort(key=lambda x: self.image_aspect_ratio(x))
  
      # divide into groups, one group = one batch
      self.groups = [
          [order[x % len(order)] for x in range(i, i + self.batch_size)]
          for i in range(0, len(order), self.batch_size)
      ]
  
imports: import numpy
  import random
  import warnings
  from tensorflow import keras
  from ..utils.anchors import anchor_targets_bbox, anchors_for_shape, guess_shapes
  from ..utils.config import parse_anchor_parameters, parse_pyramid_levels
  from ..utils.image import TransformParameters, adjust_transform_for_image, apply_transform, preprocess_image, resize_image
  from ..utils.transform import transform_aabb
label_desc: Use image node_id 23 for calling the Generator obj's underlying member method code with example usage: obj.group_images() without return types