class_docstr: The loss metric function maker.
docstr: Makes the loss metric function.
  
  Returns:
    A function _metric_fn(). See `_metric_fn()` for its signature.
docstr_tok: ["Makes","the","loss","metric","function",".","Returns",":","A","function","_metric_fn","(",")",".","See","`","_metric_fn","(",")","`","for","its","signature","."]
code: def make(self) -> utils.MetricFunction:
      """Makes the loss metric function.
  
      Returns:
        A function _metric_fn(). See `_metric_fn()` for its signature.
      """
  
      def _get_weights(
          features: Dict[str, utils.TensorLike]
      ) -> utils.TensorLike:
          """Gets weights tensor from features and reshape it to 2-D if necessary."""
  
          weights = None
          if self.weights_feature_name:
              weights = tf.convert_to_tensor(
                  value=features[self.weights_feature_name]
              )
              # Convert weights to a 2-D Tensor.
              weights = utils.reshape_to_2d(weights)
          return weights
  
      def _metric_fn(
          labels: utils.TensorLike,
          predictions: utils.TensorLike,
          features: Dict[str, utils.TensorLike],
      ) -> tf.Tensor:
          """Defines the metric fn."""
  
          weights = _get_weights(features)
          metric_dict = self.build_key_to_loss_fn_mapping(
              self.name, self.lambda_weight
          )
          loss = metric_dict.get(self.loss_key, None)
          if loss is None:
              raise ValueError(
                  f"loss_key {self.loss_key} not supported."
              )
          return loss.eval_metric(labels, predictions, weights)
  
      return _metric_fn
  
imports: from typing import Any, Callable, Dict, List, Mapping, Optional, Sequence, Tuple, Union
  import tensorflow
  from tensorflow_ranking.python import losses_impl
  from tensorflow_ranking.python import utils
label_desc: Use image node_id 3 for calling the _LossMetricFunctionMaker obj's underlying member method code with example usage: obj.make() and returns: _metric_fn, weights, loss