code: def weight_normalization(
      w, dim=0, eps=1e-12, g_init=None, fix_parameters=False
  ):
      """Weight Normalization.
  
      .. math::
          \mathbf{w}_{WN} = g \dfrac{\mathbf{w}}{\|\mathbf{w}\|}
  
      where :math:`\mathbf{w}` is the input weights to be normalized,
      and :math:`g` is learnable multiplication factors each of which is applied to each input weights at `dim`.
      This function is in general used as callback passed to apply_w for PF.convolution, PF.affine and so on.
      According to the author`s `original implementation <https://github.com/TimSalimans/weight_norm>`_, :math:`v` should be initialized by :math:`N(0, 0.05)`.
      To meet this condition, initializer should be passed to convolution which Weight Normalization is applied, like an example below.
  
  
      References:
          * `Tim Salimans, Diederik P. Kingma, Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks.
            <https://arxiv.org/abs/1602.07868>`_
  
      Args:
          W (~nnabla.Variable): Input N-D array with shape. This is normally network parameter.
          dim (`int`):
              Output dimension. Default is 0.
              If the dimension is not 0, then the specified dimension becomes the most-left dimension by transposing.
          eps (`float`): Epsilon for the normalization. Default is 1e-12.
          g_init (:obj:`nnabla.initializer.BaseInitializer` or :obj:`numpy.ndarray`): Initializer for the scale. By default, L2-norm of weights corresponding to `dim` are used.
  
  
      Returns:
          ~nnabla.Variable:  :math:`W` with the same shape as :math:`v`.
  
      Example:
  
          .. code-block:: python
  
              import nnabla as nn
              import nnabla.parametric_functions as PF
              import nnabla.initializer as I
  
              # h is nn.Variable.
  
              # convolution
              # according to the original implementation, w should be initialized by N(0, 0.05).
              h = PF.convolution(h, ..., apply_w=PF.weight_normalization, w_init=I.NormalInitializer(0.05))
  
              # affine
              h = PF.affine(h, ..., apply_w=lambda w: PF.weight_normalization(w, dim=1), w_init=I.NormalInitializer(0.05))
  
      .. warning::
         Up to the version 1.10.0, this had been implemented as the composite functions.
  
      """
      outmaps = w.shape[dim]
      if g_init is None:
          g_init = WeightNormalizationScaleInitializer(w, dim, eps)
      g = get_parameter_or_create(
          "g",
          (outmaps,),
          initializer=g_init,
          need_grad=True,
          as_need_grad=not fix_parameters,
      )
      return F.weight_normalization(w, g, dim, eps)
  
imports: from six import exec_
  import numpy
  import nnabla
  import nnabla.functions
  from nnabla.parameter import get_parameter_or_create, get_parameter
  from nnabla.initializer import calc_uniform_lim_glorot, ConstantInitializer, NormalInitializer, UniformInitializer, WeightNormalizationScaleInitializer
label_desc: Use image node_id 43 for calling a global function with example usage: weight_normalization(w, dim, eps, g_init, fix_parameters) and returns: F