code: def _compute_non_batch_kl(mu_a, sigma_a, mu_b, sigma_b):
      """Non-batch KL for N(mu_a, sigma_a), N(mu_b, sigma_b)."""
      # Check using numpy operations
      # This mostly repeats the tensorflow code _kl_mvn_mvn(), but in numpy.
      # So it is important to also check that KL(mvn, mvn) = 0.
      sigma_b_inv = np.linalg.inv(sigma_b)
  
      t = np.trace(sigma_b_inv.dot(sigma_a))
      q = (mu_b - mu_a).dot(sigma_b_inv).dot(mu_b - mu_a)
      k = mu_a.shape[0]
      l = np.log(np.linalg.det(sigma_b) / np.linalg.det(sigma_a))
  
      return 0.5 * (t + q - k + l)
  
imports: import os
  from absl.testing import parameterized
  import numpy
  from scipy import stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.bijectors import transform_diagonal
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import lognormal
  from tensorflow_probability.python.distributions import mvn_tril
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 1 for calling a global function with example usage: _compute_non_batch_kl(mu_a, sigma_a, mu_b, sigma_b) and returns: unknown