code: def test_sensitivity_specificity_ignored_labels():
      y_true = [1, 1, 2, 3]
      y_pred = [1, 3, 3, 3]
  
      specificity_13 = partial(
          specificity_score, y_true, y_pred, labels=[1, 3]
      )
      specificity_all = partial(
          specificity_score, y_true, y_pred, labels=None
      )
  
      assert_allclose(
          [1.0, 0.33], specificity_13(average=None), rtol=R_TOL
      )
      assert_allclose(
          np.mean([1.0, 0.33]),
          specificity_13(average="macro"),
          rtol=R_TOL,
      )
      assert_allclose(
          np.average([1.0, 0.33], weights=[2.0, 1.0]),
          specificity_13(average="weighted"),
          rtol=R_TOL,
      )
      assert_allclose(
          3.0 / (3.0 + 2.0), specificity_13(average="micro"), rtol=R_TOL
      )
  
      # ensure the above were meaningful tests:
      for each in ["macro", "weighted", "micro"]:
          assert specificity_13(average=each) != specificity_all(
              average=each
          )
  
imports: from functools import partial
  import numpy
  import pytest
  from sklearn import datasets, svm
  from sklearn.metrics import accuracy_score, average_precision_score, brier_score_loss, cohen_kappa_score, jaccard_score, precision_score, recall_score, roc_auc_score
  from sklearn.preprocessing import label_binarize
  from sklearn.utils._testing import assert_allclose, assert_array_equal, assert_no_warnings
  from sklearn.utils.validation import check_random_state
  from imblearn.metrics import classification_report_imbalanced, geometric_mean_score, macro_averaged_mean_absolute_error, make_index_balanced_accuracy, sensitivity_score, sensitivity_specificity_support, specificity_score
label_desc: Use image node_id 5 for calling a global function with example usage: test_sensitivity_specificity_ignored_labels() without return types