code: def forward(self, inputs):
      xp = backend.get_array_module(*inputs)
      x, gamma, beta = inputs
  
      # Note: we must be in train mode.
      assert configuration.config.train
  
      head_ndim = gamma.ndim + 1
      expander = (None, Ellipsis) + (None,) * (x.ndim - head_ndim)
  
      # NOTE(tommi): cuDNN is not used since it does not support
      # batch renormalization
      axis = (0,) + tuple(range(head_ndim, x.ndim))
      mean = x.mean(axis=axis, dtype=gamma.dtype)
      var = x.var(axis=axis, dtype=gamma.dtype)
      self.std = xp.sqrt(var + self.eps, dtype=var.dtype)
  
      running_sigma = xp.sqrt(
          self._running_var + self.eps, dtype=self._running_mean.dtype
      )
      self.r = xp.clip(
          self.std / running_sigma, 1.0 / self.rmax, self.rmax
      )
      d = xp.clip(
          (mean - self._running_mean) / running_sigma,
          -self.dmax,
          self.dmax,
      )
  
      gamma = gamma[expander]
      beta = beta[expander]
  
      if xp is numpy:
          self.x_hat = _xhat(x, mean, self.std, expander)
          self.x_hat_renorm = (
              self.x_hat * self.r[expander] + d[expander]
          )
          y = gamma * self.x_hat_renorm
          y += beta
          y = y.astype(dtype=x.dtype)
      else:
          self.x_hat, self.x_hat_renorm, y = cuda.elementwise(
              "T x, U mean, U std, U gamma, U beta, U r, U d",
              "U x_hat, U x_hat_renorm, T y",
              """
                  x_hat = (x - mean) / std;
                  x_hat_renorm = x_hat * r + d;
                  y = gamma * x_hat_renorm + beta;
                  """,
              "brn_fwd",
          )(
              x,
              mean[expander],
              self.std[expander],
              gamma,
              beta,
              self.r[expander],
              d[expander],
          )
  
      if self.update_statistics:
          m = x.size // gamma[expander].size
          self._running_mean *= self.decay
          adjust = m / max(m - 1.0, 1.0)  # unbiased estimation
          temp_ar = xp.array(mean)
          temp_ar *= 1 - self.decay
          self._running_mean += temp_ar
          del temp_ar
          self._running_var *= self.decay
          temp_ar = xp.array(var)
          temp_ar *= (1 - self.decay) * adjust
          self._running_var += temp_ar
          del temp_ar
  
      return (y,)
  
imports: import warnings
  import numpy
  from chainer import backend
  from chainer.backends import cuda
  from chainer import configuration
  from chainer import function
  from chainer.functions.normalization import batch_normalization
  from chainer.utils import type_check
label_desc: Use image node_id 6 for calling the BatchRenormalizationFunction obj's underlying member method code with example usage: obj.forward(inputs) and returns: y