code: def test_elementwise_numerical(self, same_inputs, model, phi, get):
      if "conv" in model:
          test_utils.skip_test(self)
  
      key, split = random.split(random.PRNGKey(1))
  
      output_dim = 1
      b_std = 0.01
      W_std = 1.0
      rtol = 2e-3
      deg = 25
      if get == "ntk":
          rtol *= 2
      if default_backend() == "tpu":
          rtol *= 2
  
      if model == "fc":
          X0_1 = random.normal(key, (3, 7))
          X0_2 = None if same_inputs else random.normal(split, (5, 7))
          affine = stax.Dense(1024, W_std, b_std)
          readout = stax.Dense(output_dim)
          depth = 1
      else:
          X0_1 = random.normal(key, (2, 8, 8, 3))
          X0_2 = (
              None
              if same_inputs
              else random.normal(split, (3, 8, 8, 3))
          )
          affine = stax.Conv(
              1024, (3, 2), W_std=W_std, b_std=b_std, padding="SAME"
          )
          readout = stax.serial(
              stax.GlobalAvgPool()
              if "pool" in model
              else stax.Flatten(),
              stax.Dense(output_dim),
          )
          depth = 2
  
      _, _, kernel_fn = stax.serial(*[affine, phi] * depth, readout)
      analytic_kernel = kernel_fn(X0_1, X0_2, get)
  
      fn = lambda x: phi[1]((), x)
      _, _, kernel_fn = stax.serial(
          *[affine, stax.ElementwiseNumerical(fn, deg=deg)] * depth,
          readout,
      )
      numerical_activation_kernel = kernel_fn(X0_1, X0_2, get)
  
      test_utils.assert_close_matrices(
          self, analytic_kernel, numerical_activation_kernel, rtol
      )
  
imports: import itertools
  import random
  from absl.testing import absltest
  from jax import config
  from jax import default_backend
  from jax import grad, jacfwd, jacrev, jit, jvp, value_and_grad
  from jax import random
  import jax.numpy
  import neural_tangents
  from neural_tangents import stax
  from neural_tangents._src.empirical import _DEFAULT_TESTING_NTK_IMPLEMENTATION
  from tests import test_utils
label_desc: Use image node_id 1 for calling the ElementwiseNumericalTest obj's underlying member method code with example usage: obj.test_elementwise_numerical(same_inputs, model, phi, get) without return types