code: def custom_aggregator(input_tensor, tensor_id: str):
      """Creates custom aggregator op that collects numeric metrics from the tensor.
  
      Args:
        input_tensor: Tensor to be scanned through this operator. This tensor will
          be bypassed to the output tensor of this operator.
        tensor_id: String, the identity of the tensor to be scanned.
  
      Returns:
        A `Tensor` of the same value as `input_tensor`.
  
      Raises:
        ValueError: If the given type of `input_tensor` is not float32.
      """
      if input_tensor.dtype != dtypes.float32:
          raise ValueError(
              "Custom aggregator op only accept float32 values."
          )
      return custom_aggregator_op_wrapper.custom_aggregator(
          input_tensor, tensor_id
      )
  
imports: from tensorflow.compiler.mlir.quantization.tensorflow.calibrator import custom_aggregator_op_wrapper
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import load_library
  from tensorflow.python.platform import resource_loader
label_desc: Use image node_id 1 for calling a global function with example usage: custom_aggregator(input_tensor, tensor_id) and returns: custom_aggregator_op_wrapper