code: def cross(
      vector1: TensorLike,
      vector2: TensorLike,
      axis: int = -1,
      name: str = "vector_cross",
  ) -> TensorLike:
      """Computes the cross product between two tensors along an axis.
  
      Note:
        In the following, A1 to An are optional batch dimensions, which should be
        broadcast compatible.
  
      Args:
        vector1: A tensor of shape `[A1, ..., Ai = 3, ..., An]`, where the dimension
          i = axis represents a 3d vector.
        vector2: A tensor of shape `[A1, ..., Ai = 3, ..., An]`, where the dimension
          i = axis represents a 3d vector.
        axis: The dimension along which to compute the cross product.
        name: A name for this op which defaults to "vector_cross".
  
      Returns:
        A tensor of shape `[A1, ..., Ai = 3, ..., An]`, where the dimension i = axis
        represents the result of the cross product.
      """
      with tf.name_scope(name):
          vector1 = tf.convert_to_tensor(value=vector1)
          vector2 = tf.convert_to_tensor(value=vector2)
  
          shape.check_static(
              tensor=vector1,
              tensor_name="vector1",
              has_dim_equals=(axis, 3),
          )
          shape.check_static(
              tensor=vector2,
              tensor_name="vector2",
              has_dim_equals=(axis, 3),
          )
          shape.compare_batch_dimensions(
              tensors=(vector1, vector2),
              last_axes=-1,
              broadcast_compatible=True,
          )
  
          vector1_x, vector1_y, vector1_z = tf.unstack(
              vector1, axis=axis
          )
          vector2_x, vector2_y, vector2_z = tf.unstack(
              vector2, axis=axis
          )
          n_x = vector1_y * vector2_z - vector1_z * vector2_y
          n_y = vector1_z * vector2_x - vector1_x * vector2_z
          n_z = vector1_x * vector2_y - vector1_y * vector2_x
          return tf.stack((n_x, n_y, n_z), axis=axis)
  
file_path: graphics/tensorflow_graphics/math/vector.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from tensorflow_graphics.util import asserts
  from tensorflow_graphics.util import export_api
  from tensorflow_graphics.util import shape
  from tensorflow_graphics.util.type_alias import TensorLike
label_desc: Use image node_id 1 for calling a global function with example usage: cross(vector1, vector2, axis, name) and returns: tf