code: def test_op_batch_normalization(
      use_cudnn, sample, device_id, precision
  ):
      dtype = PRECISION_TO_TYPE[precision]
      epsilon = 0.00001
      dev = cntk_device(device_id)
  
      t = AA(sample, dtype=dtype).reshape(-1, 1)
      mean = 1
      var = 2
      init_scale = 3
      init_bias = 4
  
      forward = [
          (x - mean) / np.sqrt(var + epsilon) * init_scale + init_bias
          for x in t
      ]
  
      expected_forward = AA(forward)
  
      scale = Parameter(
          init=AA([init_scale], dtype=dtype), dtype=dtype, device=dev
      )
      bias = Parameter(
          init=AA([init_bias], dtype=dtype), dtype=dtype, device=dev
      )
      run_mean = constant(mean, shape=(1), dtype=dtype, device=dev)
      run_variance = constant(var, shape=(1), dtype=dtype, device=dev)
      run_count = constant(0, dtype=dtype, device=dev)
  
      from cntk import batch_normalization
  
      a = C.input_variable(
          shape=(1), dtype=dtype, needs_gradient=False, name="a"
      )
  
      with pytest.warns(Warning):
          op = batch_normalization(
              a,
              scale,
              bias,
              run_mean,
              run_variance,
              False,
              # no running_count here,
              epsilon=epsilon,
              use_cudnn_engine=use_cudnn,
          )
  
      op_node = batch_normalization(
          a,
          scale,
          bias,
          run_mean,
          run_variance,
          running_count=run_count,
          spatial=False,
          epsilon=epsilon,
          use_cudnn_engine=use_cudnn,
      )
  
      forward_input = {a: t}
  
      unittest_helper(
          op_node,
          forward_input,
          expected_forward,
          expected_backward=None,
          device_id=device_id,
          precision=precision,
      )
  
imports: from __future__ import division
  import numpy
  import cntk
  import pytest
  from .ops_test_utils import unittest_helper, _test_unary_op, _test_binary_op, AA, precision, PRECISION_TO_TYPE, cntk_device
  from cntk.tests.test_utils import TOLERANCE_ABSOLUTE
  from cntk.internal.utils import eval
  from cntk.internal import sanitize_dtype_cntk
  from ..None import constant
  from cntk.variables import Parameter, Constant
label_desc: Use image node_id 27 for calling a global function with example usage: test_op_batch_normalization(use_cudnn, sample, device_id, precision) without return types