code: def embed_coords(self, coords):
      # Use hyperspherical coordinates.
      result = []
      first_coord = 1.0
      for i in range(self.dims):
          x = coords[..., i]
          result.append(first_coord * tf.math.cos(x))
          first_coord = first_coord * tf.math.sin(x)
      result.append(first_coord)
      # Ensure that the last coordinate is the 'z' coordinate.
      result = list(reversed(result))
      return tf.stack(result, axis=-1)
  
imports: from absl.testing import parameterized
  import numpy
  import scipy.special
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import exp
  from tensorflow_probability.python.bijectors import scale
  from tensorflow_probability.python.bijectors import scale_matvec_tril
  from tensorflow_probability.python.experimental.tangent_spaces import spaces_test_util
  from tensorflow_probability.python.experimental.tangent_spaces import spherical
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 2 for calling the _SpheresTest obj's underlying member method code with example usage: obj.embed_coords(coords) and returns: tf