code: def get_spherical_normal_loc_scale(d):
      if isinstance(d, independent_lib.Independent):
          return get_spherical_normal_loc_scale(d.distribution)
      if isinstance(
          d, (normal_lib.Normal, mvn_diag_lib.MultivariateNormalDiag)
      ):
          return d.loc, d.scale
      raise TypeError(
          "Expected kernel `posterior` to be spherical Normal; "
          'saw: "{}".'.format(type(d).__name__)
      )
  
imports: import collections
  import tensorflow.compat.v2
  from tensorflow_probability.python import random
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.experimental.nn import layers
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.util.seed_stream import SeedStream
label_desc: Use image node_id 2 for calling a global function with example usage: get_spherical_normal_loc_scale(d) and returns: get_spherical_normal_loc_scale, d,  d