code: def test_batch_norm():
      def verify_batch_norm(shapes):
          data = [
              np.absolute(
                  np.random.normal(size=shape).astype("float32")
              )
              for shape in shapes
          ]
          relay_args = [relay.const(arg) for arg in data]
  
          eps = 1e-5
  
          def reference(x, gamma, beta, moving_mean, moving_var):
              return (x - moving_mean) / np.sqrt(
                  moving_var + eps
              ) * gamma + beta
  
          ref_res = reference(*data)
  
          call = relay.nn.batch_norm(*relay_args, epsilon=eps)[0]
          call_val = run_as_python(call)
  
          # there will be a change in accuracy so we need to check
          # approximate equality
          assert isinstance(call_val, tvm.nd.NDArray)
          tvm.testing.assert_allclose(
              call_val.numpy(), ref_res, atol=eps, rtol=eps
          )
  
      verify_batch_norm([(10, 20), (20,), (20,), (20,), (20,)])
      verify_batch_norm([(20, 10), (10,), (10,), (10,), (10,)])
      verify_batch_norm([(10, 50), (50,), (50,), (50,), (50,)])
      verify_batch_norm([(30, 40), (40,), (40,), (40,), (40,)])
  
imports: import numpy
  import tvm
  from tvm import te
  from tvm import relay
  from tvm.relay.testing import run_as_python
  from tvm.relay.prelude import Prelude
  from tvm.runtime.container import ADT
  from tvm.relay.backend.interpreter import RefValue, ConstructorValue
label_desc: Use image node_id 33 for calling a global function with example usage: test_batch_norm() and returns: unknown