code: def xnli_compute_metrics(task_name, preds, labels):
      warnings.warn(DEPRECATION_WARNING, FutureWarning)
      requires_backends(xnli_compute_metrics, "sklearn")
      assert len(preds) == len(
          labels
      ), f"Predictions and labels have mismatched lengths {len(preds)} and {len(labels)}"
      if task_name == "xnli":
          return {"acc": simple_accuracy(preds, labels)}
      else:
          raise KeyError(task_name)
  
imports: import warnings
  from ...utils import is_sklearn_available, requires_backends
label_desc: Use image node_id 5 for calling a global function with example usage: xnli_compute_metrics(task_name, preds, labels) and returns: dict