def METHOD_NAME(self, layer_cls, init_args):
    if not tf.config.list_physical_devices("GPU"):
        if layer_cls in NO_CPU_FP16_KERNEL_LAYERS:
            self.skipTest(
                "There is currently no float16 CPU kernel registered for "
                "operations `tf.image.adjust_saturation`, and "
                "`tf.image.adjust_hue`. Skipping."
            )
    keras.mixed_precision.set_global_policy("mixed_float16")
    img = tf.random.uniform(
        shape=(3, 512, 512, 3), minval=0, maxval=255, dtype=tf.float32
    )
    bounding_boxes = {
        "boxes": tf.convert_to_tensor(
            [
                [
                    [200, 200, 400, 400],
                    [250, 250, 450, 450],
                    [300, 300, 500, 500],
                ],  # Bounding boxes for image 1
                [
                    [100, 100, 300, 300],
                    [150, 150, 350, 350],
                    [200, 200, 400, 400],
                ],  # Bounding boxes for image 2
                [
                    [300, 300, 500, 500],
                    [350, 350, 550, 550],
                    [400, 400, 600, 600],
                ],
            ],  # Bounding boxes for image 3
            dtype=tf.float32,
        ),
        "classes": tf.ones((3, 3), dtype=tf.float32),
    }
    inputs = {"images": img}
    if layer_cls in NO_BOUNDING_BOXES_TESTS:
        inputs["labels"] = bounding_boxes["classes"]
    else:
        inputs["bounding_boxes"] = bounding_boxes
    layer = layer_cls(**init_args)
    layer(inputs)