code: def weight_standardization(
      w, channel_axis=0, eps=1e-05, output_stat=False
  ):
      r"""
      Applies Weight Standardization over an input weight, which is defined as:
  
      .. math::
        \begin{eqnarray}
          \mu_{W_i} &=& \frac{1}{I} \sum_{j=1}^{I} W_{ij} \\
          \sigma_{W_i} &=& \sqrt{\frac{1}{I} \sum_{i=1}^{I} \left(W_{ij} - \mu_{W_{i}}\right)^2 + \epsilon} \\
          \hat{W_{ij}} &=& \frac{W_{ij} - \mu_{W_i}}{\sigma_{W_i}} \\
          y &=& \hat{W} \ast x
        \end{eqnarray}
  
      Example:
          .. code-block:: python
  
              import numpy as np
              import nnabla as nn
              import nnabla.functions as F
              import nnabla.parametric_functions as PF
  
              rng = np.random.RandomState(313)
              x = nn.Variable.from_numpy_array(rng.randn(*(32, 16, 3, 3)))
  
              # For convolution:
  
              def ws_callback_conv(w):
                  return F.weight_standardization(w, channel_axis=0)
  
              y = PF.convolution(x, 10, (2, 2), apply_w=ws_callback_conv)
  
              # For affine:
  
              def ws_callback_affine(w): 
                  return F.weight_standardization(w, channel_axis=1)
  
              y = PF.affine(x, 10, apply_w=ws_callback_affine)
  
  
      References:
  
        * `Siyuan Qiao, Huiyu Wang, Chenxi Liu, Wei Shen, Alan Yuille, Weight Standardization
          <https://arxiv.org/pdf/1903.10520v1.pdf>`_
  
      Args:
          w (Variable): A weight variable.
          channel_axis (int): An axis for output channel. Default value is 0 which assumes the weights of convolution.
          eps (float): Tiny value to avoid zero division by std.
          output_stat(bool): If true, the batch statistics of mean and variance.
  
      Returns:
          * :obj:`~nnabla.Variable`: Standardized output weight.
          * :obj:`~nnabla.Variable`: Mean (if `output_stat=True`)
          * :obj:`~nnabla.Variable`: Std (if `output_stat=True`)
  
      """
      from .function_bases import (
          weight_standardization as weight_standardization_base,
      )
  
      n_outputs = 3 if output_stat else 1
  
      return weight_standardization_base(
          w, channel_axis=channel_axis, eps=eps, n_outputs=n_outputs
      )
  
imports: from __future__ import absolute_import
  from .function_bases import *
  from six.moves import reduce
  import numpy
  import nnabla
label_desc: Use image node_id 12 for calling a global function with example usage: weight_standardization(w, channel_axis, eps, output_stat) and returns: weight_standardization_base