code: def test_sensitivity_specificity_score_binary():
      y_true, y_pred, _ = make_prediction(binary=True)
  
      # detailed measures for each class
      sen, spe, sup = sensitivity_specificity_support(
          y_true, y_pred, average=None
      )
      assert_allclose(sen, [0.88, 0.68], rtol=R_TOL)
      assert_allclose(spe, [0.68, 0.88], rtol=R_TOL)
      assert_array_equal(sup, [25, 25])
  
      # individual scoring function that can be used for grid search: in the
      # binary class case the score is the value of the measure for the positive
      # class (e.g. label == 1). This is deprecated for average != 'binary'.
      for kwargs in ({}, {"average": "binary"}):
          sen = assert_no_warnings(
              sensitivity_score, y_true, y_pred, **kwargs
          )
          assert sen == pytest.approx(0.68, rel=R_TOL)
  
          spe = assert_no_warnings(
              specificity_score, y_true, y_pred, **kwargs
          )
          assert spe == pytest.approx(0.88, rel=R_TOL)
  
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 2 for calling a global function with example usage: test_sensitivity_specificity_score_binary() without return types