code: def test_op_batch_normalization_spatial_shape_inference(
      channels, input_size, device_id, precision
  ):
      dtype = PRECISION_TO_TYPE[precision]
      dev = cntk_device(device_id)
  
      spatial = True
      epsilon = 0.01
  
      init_scale = 1
      init_bias = 2
      init_mean = 3
      init_var = 4
      init_count = 2
  
      shape = (channels, input_size, input_size)
      param_shape = (C.InferredDimension,)
  
      i = C.input_variable(shape, dtype=dtype)
      scale = C.parameter(
          param_shape, init=init_scale, dtype=dtype, device=dev
      )
      bias = C.parameter(
          param_shape, init=init_bias, dtype=dtype, device=dev
      )
      run_mean = C.constant(
          init_mean, shape=param_shape, dtype=dtype, device=dev
      )
      run_var = C.constant(
          init_var, shape=param_shape, dtype=dtype, device=dev
      )
      run_count = C.constant(
          init_count, shape=(), dtype=dtype, device=dev
      )
  
      bn = C.batch_normalization(
          i,
          scale,
          bias,
          run_mean,
          run_var,
          spatial,
          normalization_time_constant=-1,
          epsilon=epsilon,
          running_count=run_count,
      )
  
      for param in [scale, bias, run_mean, run_var]:
          assert param.shape == (channels,)
  
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 29 for calling a global function with example usage: test_op_batch_normalization_spatial_shape_inference(channels, input_size, device_id, precision) without return types