def METHOD_NAME(self):
    images_shape = (8, 512, 512, 3)
    boxes_shape = (8, 10, 4)
    classes_shape = (8, 10)
    images = np.random.uniform(size=images_shape)
    boxes = np.random.uniform(size=boxes_shape, low=0.0, high=1.0)
    classes = np.random.uniform(size=classes_shape, low=0, high=5)
    strides = [2**i for i in range(3, 8)]
    scales = [2**x for x in [0, 1 / 3, 2 / 3]]
    sizes = [x**2 for x in [32.0, 64.0, 128.0, 256.0, 512.0]]
    aspect_ratios = [0.5, 1.0, 2.0]
    anchor_generator = cv_layers.AnchorGenerator(
        bounding_box_format="yxyx",
        sizes=sizes,
        aspect_ratios=aspect_ratios,
        scales=scales,
        strides=strides,
    )
    encoder = RetinaNetLabelEncoder(
        anchor_generator=anchor_generator,
        bounding_box_format="xyxy",
    )
    bounding_boxes = {"boxes": boxes, "classes": classes}
    box_targets, class_targets = encoder(images, bounding_boxes)
    self.assertEqual(box_targets.shape, (8, 49104, 4))
    self.assertEqual(class_targets.shape, (8, 49104))