code: def test_fails_to_load_metric():
      from mlflow.metrics.metric_definitions import (
          _cached_evaluate_load,
      )
  
      _cached_evaluate_load.cache_clear()
  
      predictions = pd.Series(["random text", "This is a sentence"])
      e = ImportError("mocked error")
      with mock.patch(
          "mlflow.metrics.metric_definitions._cached_evaluate_load",
          side_effect=e,
      ) as mock_load:
          with mock.patch(
              "mlflow.metrics.metric_definitions._logger.warning"
          ) as mock_warning:
              toxicity().eval_fn(predictions, None, {})
              mock_load.assert_called_once_with(
                  "toxicity", module_type="measurement"
              )
              mock_warning.assert_called_once_with(
                  f"Failed to load 'toxicity' metric (error: {e!r}), skipping metric logging.",
              )
  
imports: from unittest import mock
  import pandas
  import pytest
  from mlflow.metrics import MetricValue, ari_grade_level, exact_match, f1_score, flesch_kincaid_grade_level, mae, mape, max_error, mse, ndcg_at_k, precision_at_k, precision_score, r2_score, recall_at_k, recall_score, rmse, rouge1, rouge2, rougeL, rougeLsum, toxicity
label_desc: Use image node_id 11 for calling a global function with example usage: test_fails_to_load_metric() without return types