code: def _softmin_sentence_score(
      token_scores: List[np.ndarray], *, temperature: float = 0.05
  ) -> np.ndarray:
      """
      Sentence overall label quality scoring using the "softmin" method.
  
      Parameters
      ----------
      token_scores:
          Per-token label quality scores in nested list format,
          where `token_scores[i]` is a list of scores for each toke in the i'th sentence.
  
      temperature:
          Temperature of the softmax function.
  
          Lower values encourage this method to converge toward the label quality score of the token with the lowest quality label in the sentence.
  
          Higher values encourage this method to converge toward the average label quality score of all tokens in the sentence.
  
      Returns
      ---------
      sentence_scores:
          Array of shape ``(N, )``, where N is the number of sentences in the dataset, with one overall label quality score for each sentence.
  
      Examples
      ---------
      >>> from cleanlab.token_classification.rank import _softmin_sentence_score
      >>> token_scores = [[0.9, 0.6], [0.0, 0.8, 0.8], [0.8]]
      >>> _softmin_sentence_score(token_scores)
      array([6.00741787e-01, 1.80056239e-07, 8.00000000e-01])
      """
      if temperature == 0:
          return np.array([np.min(scores) for scores in token_scores])
  
      if temperature == np.inf:
          return np.array([np.mean(scores) for scores in token_scores])
  
      def fun(scores: np.ndarray) -> float:
          return np.dot(
              scores,
              softmax(
                  x=1 - np.array(scores),
                  temperature=temperature,
                  axis=0,
                  shift=True,
              ),
          )
  
      sentence_scores = list(map(fun, token_scores))
      return np.array(sentence_scores)
  
file_path: cleanlab/cleanlab/token_classification/rank.py
imports: import pandas
  import numpy
  from typing import List, Optional, Union, Tuple
  from cleanlab.rank import get_label_quality_scores
  from cleanlab.internal.numerics import softmax
label_desc: Use image node_id 3 for calling a global function with example usage: _softmin_sentence_score(token_scores) and returns: np, np, np, np