ic may
    therefore be affected in turn.

    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.BinarySpecificity`, :class:`~torchmetrics.classification.MulticlassSpecificity`
    and :class:`~torchmetrics.classification.MultilabelSpecificity` for the specific details of each argument influence
    and examples.

    Legacy Example:
        >>> from torch import tensor
        >>> preds  = tensor([2, 0, 2, 1])
        >>> target = tensor([1, 1, 2, 0])
        >>> specificity = Specificity(task="multiclass", average='macro', num_classes=3)
        >>> specificity(preds, target)
        tensor(0.6111)
        >>> specificity = Specificity(task="multiclass", average='micro', num_classes=3)
        >>> specificity(preds, target)
        tensor(0.6250)

    