code: def batch_renormalization(
      x,
      gamma,
      beta,
      rmax,
      dmax,
      eps=2e-5,
      running_mean=None,
      running_var=None,
      decay=0.9,
      update_statistics=False,
  ):
      """Batch renormalization function.
  
      This is an extension of batch normalization, which ensures that the
      training and inference models generate the same outputs that depend on
      individual examples rather than the entire minibatch.
  
      .. note::
  
          This function does not perform in-place update to
          ``running_mean`` and ``running_var`` by default, contrary to
          :func:`~chainer.functions.batch_normalization`.
          If the function is called, it will not be possible to access the
          updated running mean and variance statistics, because they are members
          of the function object, which cannot be accessed by the caller.
          If it is desired to update the running statistics, call the function
          with ``update_statistics=True`` option.
  
      .. note::
  
          For the consistency with Batch Normalization, this function
          intentionally ignores some of the theoretical flaws in Algorithm 1 of
          the Batch Renormalization paper:
  
          - ``F.batch_renormalization`` maintains the moving average of variances
            :math:`\\sigma^2`, while the original paper maintains the moving
            average of standard deviations :math:`\\sigma`.
          - ``F.batch_renormalization`` applies Bessel's correction to update the
            moving average of variances.
  
      See: `Batch Renormalization: Towards Reducing Minibatch Dependence in
      Batch-Normalized Models <https://arxiv.org/abs/1702.03275>`_
  
      .. seealso::
  
          :class:`~chainer.links.BatchRenormalization` to manage the model
          parameters (``gamma``, ``beta``) and the statistics (``running_mean``,
          ``running_var``).
  
      """
      if running_mean is None:
          raise TypeError("running_mean is required")
      if running_var is None:
          raise TypeError("running_var is required")
      return BatchRenormalizationFunction(
          eps,
          running_mean,
          running_var,
          decay,
          rmax,
          dmax,
          update_statistics,
      )(x, gamma, beta)
  
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 2 for calling a global function with example usage: batch_renormalization(x, gamma, beta, rmax, dmax, eps, running_mean, running_var, decay, update_statistics) and returns: BatchRenormalizationFunction