code: def safe_unsigned_div(
      a: type_alias.TensorLike,
      b: type_alias.TensorLike,
      eps: Optional[type_alias.Float] = None,
      name: str = "safe_unsigned_div",
  ) -> tf.Tensor:
      """Calculates a/b with b >= 0 safely.
  
      If the tfg debug flag TFG_ADD_ASSERTS_TO_GRAPH defined in tfg_flags.py
      is set to True, this function adds assertions to the graph that check whether
      b + eps is greather than zero, and the division has no NaN or Inf values.
  
      Args:
        a: A `float` or a tensor of shape `[A1, ..., An]`, which is the nominator.
        b: A `float` or a tensor of shape `[A1, ..., An]`, which is the denominator.
        eps: A small `float`, to be added to the denominator. If left as `None`, its
          value is automatically selected using `b.dtype`.
        name: A name for this op. Defaults to 'safe_unsigned_div'.
  
      Raises:
         InvalidArgumentError: If tf-graphics debug flag is set and the division
           causes `NaN` or `Inf` values.
  
      Returns:
         A tensor of shape `[A1, ..., An]` containing the results of division.
      """
      with tf.name_scope(name):
          a = tf.convert_to_tensor(value=a)
          b = tf.convert_to_tensor(value=b)
          if eps is None:
              eps = asserts.select_eps_for_division(b.dtype)
          eps = tf.convert_to_tensor(value=eps, dtype=b.dtype)
  
          return asserts.assert_no_infs_or_nans(a / (b + eps))
  
file_path: graphics/tensorflow_graphics/util/safe_ops.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Optional
  import numpy
  import tensorflow
  from tensorflow_graphics.util import asserts
  from tensorflow_graphics.util import type_alias
label_desc: Use image node_id 6 for calling a global function with example usage: safe_unsigned_div(a, b, eps, name) and returns: asserts