code: def wishart_var(df, x):
      """Compute Wishart variance for numpy scale matrix."""
      df = np.asarray(df)[..., np.newaxis, np.newaxis]
      x = np.asarray(x)
      d = np.diagonal(x, axis1=-2, axis2=-1)
      return df * (
          x**2 + np.matmul(d[..., np.newaxis], d[..., np.newaxis, :])
      )
  
imports: import numpy
  from scipy import linalg
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.distributions import mixture_same_family
  from tensorflow_probability.python.distributions import wishart
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 3 for calling a global function with example usage: wishart_var(df, x) and returns: unknown