code: def compute_output_spec(self, image, transform):
      if len(image.shape) not in (3, 4):
          raise ValueError(
              "Invalid image rank: expected rank 3 (single image) "
              "or rank 4 (batch of images). Received input with shape: "
              f"image.shape={image.shape}"
          )
      if len(transform.shape) not in (1, 2):
          raise ValueError(
              "Invalid transform rank: expected rank 1 (single transform) "
              "or rank 2 (batch of transforms). Received input with shape: "
              f"transform.shape={transform.shape}"
          )
      return KerasTensor(image.shape, dtype=image.dtype)
  
imports: from keras import backend
  from keras import ops
  from keras.api_export import keras_export
  from keras.backend import KerasTensor
  from keras.backend import any_symbolic_tensors
  from keras.ops.operation import Operation
  from keras.ops.operation_utils import compute_conv_output_shape
label_desc: Use image node_id 3 for calling the AffineTransform obj's underlying member method code with example usage: obj.compute_output_spec(image, transform) and returns: KerasTensor