class_docstr: Compute the highest possible specificity value given the minimum sensitivity thresholds provided.
  
  This is done by first calculating the Receiver Operating Characteristic (ROC) curve for different thresholds and the
  find the specificity for a given sensitivity level.
  
  This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the
  ``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of
  :class:`~torchmetrics.classification.BinarySpecificityAtSensitivity`,
  :class:`~torchmetrics.classification.MulticlassSpecificityAtSensitivity` and
  :class:`~torchmetrics.classification.MultilabelSpecificityAtSensitivity` for the specific details of each argument
  influence and examples.
docstr: Initialize task metric.
docstr_tok: ["Initialize","task","metric","."]
code: def __new__(  # type: ignore[misc]
      cls: Type["SpecificityAtSensitivity"],
      task: Literal["binary", "multiclass", "multilabel"],
      min_sensitivity: float,
      thresholds: Optional[Union[int, List[float], Tensor]] = None,
      num_classes: Optional[int] = None,
      num_labels: Optional[int] = None,
      ignore_index: Optional[int] = None,
      validate_args: bool = True,
      **kwargs: Any,
  ) -> Metric:
      """Initialize task metric."""
      task = ClassificationTask.from_str(task)
      if task == ClassificationTask.BINARY:
          return BinarySpecificityAtSensitivity(
              min_sensitivity,
              thresholds,
              ignore_index,
              validate_args,
              **kwargs,
          )
      if task == ClassificationTask.MULTICLASS:
          if not isinstance(num_classes, int):
              raise ValueError(
                  f"`num_classes` is expected to be `int` but `{type(num_classes)} was passed.`"
              )
          return MulticlassSpecificityAtSensitivity(
              num_classes,
              min_sensitivity,
              thresholds,
              ignore_index,
              validate_args,
              **kwargs,
          )
      if task == ClassificationTask.MULTILABEL:
          if not isinstance(num_labels, int):
              raise ValueError(
                  f"`num_labels` is expected to be `int` but `{type(num_labels)} was passed.`"
              )
          return MultilabelSpecificityAtSensitivity(
              num_labels,
              min_sensitivity,
              thresholds,
              ignore_index,
              validate_args,
              **kwargs,
          )
      raise ValueError(f"Task {task} not supported!")
  
imports: from typing import Any, List, Optional, Tuple, Type, Union
  from torch import Tensor
  from typing_extensions import Literal
  from torchmetrics.classification.base import _ClassificationTaskWrapper
  from torchmetrics.classification.precision_recall_curve import BinaryPrecisionRecallCurve, MulticlassPrecisionRecallCurve, MultilabelPrecisionRecallCurve
  from torchmetrics.functional.classification.specificity_sensitivity import _binary_specificity_at_sensitivity_arg_validation, _binary_specificity_at_sensitivity_compute, _multiclass_specificity_at_sensitivity_arg_validation, _multiclass_specificity_at_sensitivity_compute, _multilabel_specificity_at_sensitivity_arg_validation, _multilabel_specificity_at_sensitivity_compute
  from torchmetrics.metric import Metric
  from torchmetrics.utilities.data import dim_zero_cat
  from torchmetrics.utilities.enums import ClassificationTask
  from torchmetrics.utilities.imports import _MATPLOTLIB_AVAILABLE
label_desc: Use image node_id 1 for calling the SpecificityAtSensitivity obj's underlying member method code with example usage: obj.__new__(cls, task, min_sensitivity, thresholds, num_classes, num_labels, ignore_index, validate_args) and returns: BinarySpecificityAtSensitivity, MulticlassSpecificityAtSensitivity, MultilabelSpecificityAtSensitivity