class_docstr: Test class for `BinarySpecificityAtSensitivity` metric.
class_docstr_tok: ["Test","class","for","`","BinarySpecificityAtSensitivity","`","metric","."]
docstr: Test that different types of `thresholds` argument lead to same result.
code: def test_binary_specificity_at_sensitivity_threshold_arg(
      self, inputs, min_sensitivity
  ):
      """Test that different types of `thresholds` argument lead to same result."""
      preds, target = inputs
  
      for pred, true in zip(preds, target):
          pred = (
              torch.tensor(np.round(pred.numpy(), 1)) + 1e-6
          )  # rounding will simulate binning
          r1, _ = binary_specificity_at_sensitivity(
              pred,
              true,
              min_sensitivity=min_sensitivity,
              thresholds=None,
          )
          r2, _ = binary_specificity_at_sensitivity(
              pred,
              true,
              min_sensitivity=min_sensitivity,
              thresholds=torch.linspace(0, 1, 100),
          )
          assert torch.allclose(r1, r2)
  
imports: from functools import partial
  import numpy
  import pytest
  import torch
  from scipy.special import expit
  from scipy.special import softmax
  from sklearn.metrics import roc_curve
  from torchmetrics.classification.specificity_sensitivity import BinarySpecificityAtSensitivity, MulticlassSpecificityAtSensitivity, MultilabelSpecificityAtSensitivity, SpecificityAtSensitivity
  from torchmetrics.functional.classification.specificity_sensitivity import _convert_fpr_to_specificity, binary_specificity_at_sensitivity, multiclass_specificity_at_sensitivity, multilabel_specificity_at_sensitivity
  from torchmetrics.metric import Metric
  from unittests import NUM_CLASSES
  from unittests.classification.inputs import _binary_cases, _multiclass_cases, _multilabel_cases
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester, inject_ignore_index, remove_ignore_index
label_desc: Use image node_id 6 for calling the TestBinarySpecificityAtSensitivity obj's underlying member method code with example usage: obj.test_binary_specificity_at_sensitivity_threshold_arg(inputs, min_sensitivity) without return types