class_docstr: Initializer which adapts its scale to the shape of the initialized array.
  
  The initializer first computes the scaling factor ``s = scale / n``, where n
  is:
  
    - Number of input units in the weight tensor, if ``mode = fan_in``.
    - Number of output units, if ``mode = fan_out``.
    - Average of the numbers of input and output units, if ``mode = fan_avg``.
  
  Then, with ``distribution="truncated_normal"`` or ``"normal"``,
  samples are drawn from a distribution with a mean of zero and a standard
  deviation (after truncation, if used) ``stddev = sqrt(s)``.
  
  With ``distribution=uniform``, samples are drawn from a uniform distribution
  within ``[-limit, limit]``, with ``limit = sqrt(3 * s)``.
  
  The variance scaling initializer can be configured to generate other standard
  initializers using the scale, mode and distribution arguments. Here are some
  example configurations:
  
  ==============  ==============================================================
  Name            Parameters
  ==============  ==============================================================
  glorot_uniform  VarianceScaling(1.0, "fan_avg", "uniform")
  glorot_normal   VarianceScaling(1.0, "fan_avg", "truncated_normal")
  lecun_uniform   VarianceScaling(1.0, "fan_in",  "uniform")
  lecun_normal    VarianceScaling(1.0, "fan_in",  "truncated_normal")
  he_uniform      VarianceScaling(2.0, "fan_in",  "uniform")
  he_normal       VarianceScaling(2.0, "fan_in",  "truncated_normal")
  ==============  ==============================================================
code: def __call__(self, shape: Sequence[int], dtype: Any) -> jax.Array:
      scale = self.scale
      fan_in, fan_out = _compute_fans(shape, self.fan_in_axes)
      if self.mode == "fan_in":
          scale /= max(1.0, fan_in)
      elif self.mode == "fan_out":
          scale /= max(1.0, fan_out)
      else:
          scale /= max(1.0, (fan_in + fan_out) / 2.0)
  
      if self.distribution == "truncated_normal":
          stddev = np.sqrt(scale)
          # Adjust stddev for truncation.
          # Constant from scipy.stats.truncnorm.std(a=-2, b=2, loc=0., scale=1.)
          distribution_stddev = np.asarray(
              0.87962566103423978, dtype=dtype
          )
          stddev = stddev / distribution_stddev
          return TruncatedNormal(stddev=stddev)(shape, dtype)
      elif self.distribution == "normal":
          stddev = np.sqrt(scale)
          return RandomNormal(stddev=stddev)(shape, dtype)
      else:
          limit = np.sqrt(3.0 * scale)
          return RandomUniform(minval=-limit, maxval=limit)(
              shape, dtype
          )
  
imports: from collections.abc import Sequence
  from typing import Any, Union
  from haiku._src import base
  from haiku._src.typing import Initializer
  import jax
  import jax.numpy
  import numpy
label_desc: Use image node_id 2 for calling the VarianceScaling obj's underlying member method code with example usage: obj.__call__(shape, dtype) and returns: TruncatedNormal, RandomNormal, RandomUniform