code: def test_classification_metrics(mocker):
      ground_truth = {
          "1": ["2", "3", "4"],
          "2": ["1", "3"],
          "3": ["1", "2"],
          "4": ["1"],
      }
      retrieved = {"1": ["2", "3"], "2": ["1"], "3": ["1"], "4": []}
      all_possible_pairs_ret = [
          ("1", "3"),
          ("2", "3"),
          ("1", "4"),
          ("2", "4"),
          ("1", "2"),
          ("3", "4"),
      ]
      ground_truth_pairs_ret = [
          ("1", "3"),
          ("2", "3"),
          ("1", "2"),
          ("1", "4"),
      ]
      retrieved_pairs_ret = [("1", "3"), ("1", "2")]
      y_true_ret = [1, 1, 1, 0, 1, 0]
      y_pred_ret = [1, 0, 0, 0, 1, 0]
  
      make_all_unique_possible_pairs_mocker = mocker.patch(
          "imagededup.handlers.metrics.classification._make_all_unique_possible_pairs"
      )
      make_all_unique_possible_pairs_mocker.return_value = (
          all_possible_pairs_ret
      )
  
      make_positive_duplicate_pairs_mocker = mocker.patch(
          "imagededup.handlers.metrics.classification._make_positive_duplicate_pairs"
      )
      make_positive_duplicate_pairs_mocker.return_value = (
          ground_truth_pairs_ret,
          retrieved_pairs_ret,
      )
      prepare_labels_mocker = mocker.patch(
          "imagededup.handlers.metrics.classification._prepare_labels"
      )
      prepare_labels_mocker.return_value = y_true_ret, y_pred_ret
      precision_recall_fscore_support_mocker = mocker.patch(
          "imagededup.handlers.metrics.classification.precision_recall_fscore_support"
      )
      classification_metrics(ground_truth, retrieved)
      make_all_unique_possible_pairs_mocker.assert_called_once_with(
          ground_truth
      )
      make_positive_duplicate_pairs_mocker.assert_called_once_with(
          ground_truth, retrieved
      )
      prepare_labels_mocker.assert_called_once_with(
          all_possible_pairs_ret,
          ground_truth_pairs_ret,
          retrieved_pairs_ret,
      )
      precision_recall_fscore_support_mocker.assert_called_once_with(
          y_true_ret, y_pred_ret
      )
  
file_path: imagededup/tests/test_classification.py
imports: import numpy
  from imagededup.handlers.metrics.classification import _get_unique_ordered_tuples, _make_all_unique_possible_pairs, _make_positive_duplicate_pairs, _prepare_labels, classification_metrics
label_desc: Use image node_id 5 for calling a global function with example usage: test_classification_metrics(mocker) without return types