code: def layer_normalization(
      inp,
      batch_axis=0,
      eps=1e-05,
      output_stat=False,
      fix_parameters=False,
      param_init=None,
      no_scale=False,
      no_bias=False,
  ):
      r"""
      Applies Layer Normalization over an input variable, which is defined as:
  
      .. math::
        \begin{eqnarray}
          \mu^l &=& \frac{1}{H} \sum_{i=1}^{H} x_i^l \\
          \sigma^l &=& \sqrt{\frac{1}{H} \sum_{i=1}^{H} \left(x_i^l - \mu^l\right)^2} \\
          y &=& \frac{x - \mu^l}{\sigma^l + \epsilon} \gamma + \beta
        \end{eqnarray}
  
      where :math:`x` and :math:`y` are input and output variable,
      :math:`\mu^l` and :math:`\sigma^l` are the mean and std of each layer along batch axis,
      and :math:`\alpha` and :math:`\beta` are trainable parameter.
  
      .. note::
          Unlike other normalization,
          which applies scalar scale and bias for each entire channel/plane,
          Layer Normalization applies per-element scale and bias.
  
      References:
  
          * `Jimmy Lei Ba, Jamie Ryan Kiros, Geoffrey E. Hinton, Layer Normalization.
            <https://arxiv.org/abs/1607.06450>`_
  
      Args:
          inp (Variable): An input variable.
          batch_axis (int or repeated int): Axes mean and variance are taken.
          eps (float): Tiny value to avoid zero division by std.
          output_stat(bool): It `True`, calculated mean and variance are also returned.
          fix_parameters (bool): When set to `True`, the beta and gamma will not be updated.
          param_init (dict):
              Parameter initializers can be set with a dict. A key of the dict must
              be ``'gamma'``, ``'beta'``.
              A value of the dict must be an :obj:`~nnabla.initializer.Initializer`
              or a :obj:`numpy.ndarray`.
              E.g. ``{'gamma': np.ones(...) * 2, 'beta': ConstantInitializer(0)}``.
          no_scale (bool): If `True`, the scale term is omitted.
          no_bias (bool): If `True`, the bias term is omitted.
  
      Returns:
          * :obj:`~nnabla.Variable`: Normalized output variable.
          * :obj:`~nnabla.Variable`: Mean (if `output_stat=True`).
          * :obj:`~nnabla.Variable`: Std (if `output_stat=True`)
      """
      from nnabla.normalization_functions import (
          _force_list,
          _init_beta_gamma,
      )
  
      batch_axis = _force_list(batch_axis)
  
      shape_stat = list(inp.shape)
      for baxis in batch_axis:
          shape_stat[baxis] = 1
  
      if param_init is None:
          param_init = {}
  
      beta, gamma = _init_beta_gamma(
          shape_stat, fix_parameters, param_init, no_bias, no_scale
      )
  
      return F.layer_normalization(
          inp,
          beta,
          gamma,
          batch_axis=batch_axis,
          eps=eps,
          output_stat=output_stat,
      )
  
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 24 for calling a global function with example usage: layer_normalization(inp, batch_axis, eps, output_stat, fix_parameters, param_init, no_scale, no_bias) and returns: F