code: def truncated_normal(
      shape: Tuple[int, ...],
      lower: float = -2,
      upper: float = 2,
      stddev: float = 1,
  ) -> JaxArray:
      """Returns a tensor with values assigned using truncated normal initialization.
  
      Args:
          shape: shape of the output tensor.
          lower: lower truncation of the normal.
          upper: upper truncation of the normal.
          stddev: expected standard deviation.
  
      Returns:
          Tensor initialized with truncated normal random variables with standard
          deviation stddev and support [lower, upper].
      """
      truncated_std = scipy.stats.truncnorm.std(
          a=lower, b=upper, loc=0.0, scale=1
      )
      stddev /= truncated_std
      return random.truncated_normal(
          shape, stddev=stddev, lower=lower, upper=upper
      )
  
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 8 for calling a global function with example usage: truncated_normal(shape, lower, upper, stddev) and returns: random