code: def setUp(self):
      dtype = self.dtype
      xdtype = self.xdtype
  
      if not hasattr(self, "axis"):
          param_shape = self.param_shape
          ndim = self.ndim
          shape = (5,) + param_shape + (2,) * ndim
      else:
          aggr_axes = self.axis
          if isinstance(self.axis, int):
              aggr_axes = (self.axis,)
          param_shape = tuple(
              s
              for i, s in enumerate(self.input_shape)
              if i not in aggr_axes
          )
          shape = self.input_shape
  
      # x, ggx, gy must share the same data type
      # gamma, beta, gggamma, ggbeta must share the same data type
      gamma = numpy.random.uniform(0.5, 1, param_shape).astype(dtype)
      beta = numpy.random.uniform(-1, 1, param_shape).astype(dtype)
      x = numpy.random.uniform(-1, 1, shape).astype(xdtype)
      gy = numpy.random.uniform(-1, 1, shape).astype(xdtype)
      ggx = numpy.random.uniform(-1, 1, shape).astype(xdtype)
      gggamma = numpy.random.uniform(-1, 1, param_shape).astype(dtype)
      ggbeta = numpy.random.uniform(-1, 1, param_shape).astype(dtype)
  
      if self.running_statistics:
          self.running_mean = numpy.random.uniform(
              -1, 1, param_shape
          ).astype(dtype)
          self.running_var = numpy.random.uniform(
              -1, 1, param_shape
          ).astype(dtype)
      else:
          self.running_mean = None
          self.running_var = None
  
      if not hasattr(self, "axis"):
          head_ndim = gamma.ndim + 1
          aggr_axes = (0,) + tuple(six.moves.range(head_ndim, x.ndim))
  
          self.expander = (None, Ellipsis) + (None,) * ndim
      else:
          self.expander = tuple(
              None if i in aggr_axes else slice(None)
              for i in range(x.ndim)
          )
  
      mean = x.mean(axis=aggr_axes)
      var = x.var(axis=aggr_axes)
  
      self.decay = 0.9
      self.mean = mean
      self.var = var
  
      self.inputs = [x, gamma, beta]
      self.grad_outputs = [gy]
      self.grad_grad_inputs = [ggx, gggamma, ggbeta]
  
      self.bn_options = {
          "decay": self.decay,
          "eps": self.eps,
      }
      if hasattr(self, "axis"):
          self.bn_options["axis"] = self.axis
      self.check_forward_options = {"atol": 1e-4, "rtol": 1e-3}
      self.check_backward_options = {
          "dtype": numpy.float64,
          "atol": 1e-4,
          "rtol": 1e-3,
      }
      self.check_double_backward_options = {
          "dtype": numpy.float64,
          "atol": 1e-3,
          "rtol": 1e-2,
      }
      if self.xdtype == numpy.float16 or self.dtype == numpy.float16:
          self.check_forward_options = {"atol": 1e-2, "rtol": 1e-2}
          self.check_backward_options = {
              "dtype": numpy.float64,
              "atol": 1e-2,
              "rtol": 1e-2,
          }
          self.check_double_backward_options = {
              "dtype": numpy.float64,
              "atol": 1e-2,
              "rtol": 1e-2,
          }
  
imports: import unittest
  import warnings
  import numpy
  import six
  import chainer
  from chainer.backends import cuda
  from chainer import functions
  from chainer import gradient_check
  from chainer import testing
  from chainer.testing import attr
  from chainer.testing import backend
label_desc: Use image node_id 1 for calling the TestBatchNormalization obj's underlying member method code with example usage: obj.setUp() without return types