code: def test_batch_norm():
      def verify_batch_norm(axis=1):
          for dtype in ["float16", "float32"]:
              data = relay.var(
                  "data", relay.TensorType((2, 4, 4, 1), dtype)
              )
              gamma_shape = (data.type_annotation.shape[axis].value,)
              beta = relay.var(
                  "beta", relay.TensorType(gamma_shape, dtype)
              )
              gamma = relay.var(
                  "gamma", relay.TensorType(gamma_shape, dtype)
              )
              moving_mean = relay.var(
                  "moving_mean", relay.TensorType(gamma_shape, dtype)
              )
              moving_var = relay.var(
                  "moving_var", relay.TensorType(gamma_shape, dtype)
              )
              y = relay.nn.batch_norm(
                  data, gamma, beta, moving_mean, moving_var, axis=axis
              )
              func = relay.Function(
                  [data, gamma, beta, moving_mean, moving_var], y[0]
              )
  
              x_data = np.random.uniform(size=(2, 4, 4, 1)).astype(
                  dtype
              )
              beta = np.random.uniform(size=gamma_shape).astype(dtype)
              gamma = np.random.uniform(size=gamma_shape).astype(dtype)
              moving_mean = np.random.uniform(size=gamma_shape).astype(
                  dtype
              )
              moving_var = np.random.uniform(size=gamma_shape).astype(
                  dtype
              )
              verify_results(
                  func,
                  [x_data, gamma, beta, moving_mean, moving_var],
                  "test_batch_norm",
                  rtol=1e-1,
                  atol=1e-1,
              )
  
      verify_batch_norm(axis=1)
      verify_batch_norm(axis=3)
  
imports: import pytest
  import numpy
  import onnxruntime
  import tvm
  from tvm import relay
  from tvm.contrib.target.onnx import to_onnx
  from tvm.relay.testing import run_infer_type
label_desc: Use image node_id 14 for calling a global function with example usage: test_batch_norm() without return types