code: def _safe_dot(
      vector1: type_alias.TensorLike,
      vector2: type_alias.TensorLike,
      eps: type_alias.Float,
  ) -> type_alias.Float:
      """Calculates dot product while ensuring it is in the range [-1, 1]."""
      dot_product = vector.dot(vector1, vector2)
      # Safely shrink to make sure machine precision does not cause the dot
      # product to be outside the [-1.0, 1.0] range.
      return safe_ops.safe_shrink(
          vector=dot_product,
          minval=-1.0,
          maxval=1.0,
          open_bounds=False,
          eps=eps,
      )
  
file_path: graphics/tensorflow_graphics/math/interpolation/slerp.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import enum
  from typing import Optional, Tuple, Union
  import tensorflow
  from tensorflow_graphics.math import vector
  from tensorflow_graphics.util import asserts
  from tensorflow_graphics.util import export_api
  from tensorflow_graphics.util import safe_ops
  from tensorflow_graphics.util import shape
  from tensorflow_graphics.util import type_alias
label_desc: Use image node_id 1 for calling a global function with example usage: _safe_dot(vector1, vector2, eps) and returns: safe_ops