code: def xavier_normal_gain(shape: Tuple[int, ...]) -> float:
      """Returns Xavier Glorot gain from
      `Understanding the difficulty of training deep feedforward neural networks
      <http://proceedings.mlr.press/v9/glorot10a/glorot10a.pdf>`_.
  
      Args:
          shape: shape of the output tensor.
  
      Returns:
          Scalar, the standard deviation gain.
      """
      fan_in, fan_out = np.prod(shape[:-1]), shape[-1]
      return np.sqrt(2 / (fan_in + fan_out))
  
file_path: objax/objax/nn/init.py
imports: from typing import Tuple
  import numpy
  import scipy.stats
  from jax import numpy
  from objax import random
  from objax.typing import JaxArray
label_desc: Use image node_id 9 for calling a global function with example usage: xavier_normal_gain(shape) and returns: np