class_docstr: Abstract generator class.
      
code: def generate_anchors(self, image_shape):
      anchor_params = None
      pyramid_levels = None
      if self.config and "anchor_parameters" in self.config:
          anchor_params = parse_anchor_parameters(self.config)
      if self.config and "pyramid_levels" in self.config:
          pyramid_levels = parse_pyramid_levels(self.config)
  
      return anchors_for_shape(
          image_shape,
          anchor_params=anchor_params,
          pyramid_levels=pyramid_levels,
          shapes_callback=self.compute_shapes,
      )
  
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 25 for calling the Generator obj's underlying member method code with example usage: obj.generate_anchors(image_shape) and returns: anchors_for_shape