code: def rank_classification(
      score,
      example=None,
      is_target=False,
      passthrough_feature_keys=None,
  ):
      """A postprocessor for the `rank_classification` preprocessor and metric."""
      if is_target:
          outputs = [
              tuple(example["idx"]),
              example["is_correct"],
              example.get("weight", 1.0),
              len(example["targets"]),
          ]
          if passthrough_feature_keys:
              for key in passthrough_feature_keys:
                  outputs.append(example[key])
          return tuple(outputs)
      else:
          return score
  
file_path: text-to-text-transfer-transformer/t5/data/postprocessors.py
imports: import tensorflow.compat.v2
label_desc: Use image node_id 9 for calling a global function with example usage: rank_classification(score, example, is_target, passthrough_feature_keys) and returns: tuple, score