code: def generate_random_test_quaternions(tensor_shape=None):
      """Generates random test quaternions."""
      if tensor_shape is None:
          tensor_dimensions = np.random.randint(low=1, high=3)
          tensor_shape = np.random.randint(
              1, 10, size=(tensor_dimensions)
          ).tolist()
      u1 = np.random.uniform(0.0, 1.0, tensor_shape)
      u2 = np.random.uniform(0.0, 2.0 * math.pi, tensor_shape)
      u3 = np.random.uniform(0.0, 2.0 * math.pi, tensor_shape)
      a = np.sqrt(1.0 - u1)
      b = np.sqrt(u1)
      return np.stack(
          (
              a * np.sin(u2),
              a * np.cos(u2),
              b * np.sin(u3),
              b * np.cos(u3),
          ),
          axis=-1,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  import math
  import numpy
  from scipy import stats
  from six.moves import range
  import tensorflow.compat.v2
  from tensorflow_graphics.geometry.transformation import axis_angle
  from tensorflow_graphics.geometry.transformation import quaternion
  from tensorflow_graphics.geometry.transformation import rotation_matrix_2d
  from tensorflow_graphics.geometry.transformation import rotation_matrix_3d
label_desc: Use image node_id 11 for calling a global function with example usage: generate_random_test_quaternions(tensor_shape) and returns: np