code: def inverse(rank: TensorLike) -> tf.Tensor:
      """Computes the inverse of input rank.
  
      Args:
        rank: A `Tensor` or anything that can be converted to a tensor using
          `tf.convert_to_tensor`.
  
      Returns:
        A `Tensor` that has each input element transformed as `x` to `1/x`.
      """
      return tf.math.divide_no_nan(1.0, rank)
  
file_path: ranking/tensorflow_ranking/python/keras/utils.py
imports: from typing import Callable
  import tensorflow
label_desc: Use image node_id 4 for calling a global function with example usage: inverse(rank) and returns: tf