code: def test_activation(self, use_cpu_only, backend, rank, op):
      kwargs = (
          {"atol": 1e-3, "rtol": 1e-4}
          if op == tf.keras.activations.exponential
          and use_cpu_only is False
          else {}
      )
      if op == tf.keras.activations.softmax and rank == 1:
          return  # skip apply softmax to a tensor that is 1D
      shape = np.random.randint(low=2, high=4, size=rank)
      model = tf.keras.Sequential(
          [tf.keras.layers.Activation(op, batch_input_shape=shape)]
      )
      run_compare_tf_keras(
          model,
          [random_gen(shape, -10, 10)],
          use_cpu_only=use_cpu_only,
          backend=backend,
          **kwargs,
      )
  
imports: import random
  from coremltools.converters.mil import testing_reqs
  from coremltools.converters.mil.frontend.tensorflow2.test.testing_utils import run_compare_tf_keras
  from coremltools.converters.mil.testing_reqs import *
label_desc: Use image node_id 2 for calling the TestActivation obj's underlying member method code with example usage: obj.test_activation(use_cpu_only, backend, rank, op) without return types