code: def _masked_minimum(data, mask, dim=1):
      """Computes the axis wise minimum over chosen elements.
  
      Args:
        data: 2-D float `Tensor` of shape `[n, m]`.
        mask: 2-D Boolean `Tensor` of shape `[n, m]`.
        dim: The dimension over which to compute the minimum.
  
      Returns:
        masked_minimums: N-D `Tensor`.
          The minimized dimension is of size 1 after the operation.
      """
      axis_maximums = tf.math.reduce_max(data, dim, keepdims=True)
      masked_minimums = (
          tf.math.reduce_min(
              tf.math.multiply(data - axis_maximums, mask),
              dim,
              keepdims=True,
          )
          + axis_maximums
      )
      return masked_minimums
  
file_path: addons/tensorflow_addons/losses/triplet.py
imports: import tensorflow
  from tensorflow_addons.losses import metric_learning
  from tensorflow_addons.utils.keras_utils import LossFunctionWrapper
  from tensorflow_addons.utils.types import FloatTensorLike, TensorLike
  from typeguard import typechecked
  from typing import Optional, Union, Callable
label_desc: Use image node_id 2 for calling a global function with example usage: _masked_minimum(data, mask, dim) and returns: masked_minimums