src/transformers/modeling_tf_utils.py/TFPreTrainedModel/get_label_to_output_name_mapping
class TFPreTrainedModel:    def get_label_to_output_name_mapping(self):
        arg_names = list(dict(inspect.signature(self.call).parameters).keys())
        if self._label_to_output_map is not None:
            return self._label_to_output_map
        elif "start_positions" in arg_names:
            return {"start_positions": "start_logits", "end_positions": "end_logits"}
        elif "sentence_order_label" in arg_names:
            return {"labels": "prediction_logits", "sentence_order_label": "sop_logits"}
        elif "next_sentence_label" in arg_names:
            return {"labels": "prediction_logits", "next_sentence_label": "seq_relationship_logits"}
        elif "mc_labels" in arg_names:
            return {"labels": "logits", "mc_labels": "mc_logits"}
        else:
            return {}