code: def _mixture_stddev_np(pi_vector, mu_vector, sigma_vector):
      """Computes the standard deviation of a univariate mixture distribution.
  
      Acts upon `np.array`s (not `tf.Tensor`s).
  
      Args:
        pi_vector: A `np.array` of mixture weights. Shape `[batch, components]`.
        mu_vector: A `np.array` of means. Shape `[batch, components]`
        sigma_vector: A `np.array` of stddevs. Shape `[batch, components]`.
  
      Returns:
        A `np.array` containing the batch of standard deviations.
      """
      pi_vector = np.expand_dims(pi_vector, axis=1)
      mean_wa = np.matmul(pi_vector, np.expand_dims(mu_vector, axis=2))
      var_wa = np.matmul(
          pi_vector, np.expand_dims(sigma_vector**2, axis=2)
      )
      mid_term = np.matmul(
          pi_vector, np.expand_dims(mu_vector**2, axis=2)
      )
      mixture_variance = (
          np.squeeze(var_wa)
          + np.squeeze(mid_term)
          - np.squeeze(mean_wa**2)
      )
      return np.sqrt(mixture_variance)
  
imports: import contextlib
  import warnings
  import numpy
  from scipy import stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.distributions import dirichlet
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import gamma
  from tensorflow_probability.python.distributions import half_normal
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import mixture
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import mvn_tril
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 2 for calling a global function with example usage: _mixture_stddev_np(pi_vector, mu_vector, sigma_vector) and returns: np