code: def test__prepare_labels():
      all_possible_pairs = [
          ("1", "3"),
          ("2", "3"),
          ("1", "4"),
          ("2", "4"),
          ("1", "2"),
          ("3", "4"),
      ]
      ground_truth_pairs = [
          ("1", "3"),
          ("2", "3"),
          ("1", "2"),
          ("1", "4"),
      ]
      retrieved_pairs = [("1", "3"), ("1", "2")]
      y_true_obtained, y_pred_obtained = _prepare_labels(
          all_possible_pairs, ground_truth_pairs, retrieved_pairs
      )
      assert y_true_obtained == [1, 1, 1, 0, 1, 0]
      assert y_pred_obtained == [1, 0, 0, 0, 1, 0]
  
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 4 for calling a global function with example usage: test__prepare_labels() without return types