class_docstr: Test class for `BinaryJaccardIndex` metric.
docstr: Test dtype support of the metric on CPU.
code: def test_binary_jaccard_index_dtype_cpu(self, inputs, dtype):
      """Test dtype support of the metric on CPU."""
      preds, target = inputs
      if (preds < 0).any() and dtype == torch.half:
          pytest.xfail(
              reason="torch.sigmoid in metric does not support cpu + half precision"
          )
      self.run_precision_test_cpu(
          preds=preds,
          target=target,
          metric_module=BinaryJaccardIndex,
          metric_functional=binary_jaccard_index,
          metric_args={"threshold": THRESHOLD},
          dtype=dtype,
      )
  
imports: from functools import partial
  import numpy
  import pytest
  import torch
  from scipy.special import expit
  from sklearn.metrics import confusion_matrix
  from sklearn.metrics import jaccard_score
  from torchmetrics.classification.jaccard import BinaryJaccardIndex, JaccardIndex, MulticlassJaccardIndex, MultilabelJaccardIndex
  from torchmetrics.functional.classification.jaccard import binary_jaccard_index, multiclass_jaccard_index, multilabel_jaccard_index
  from torchmetrics.metric import Metric
  from unittests import NUM_CLASSES, THRESHOLD
  from unittests.classification.inputs import _binary_cases, _multiclass_cases, _multilabel_cases
  from unittests.helpers.testers import MetricTester, inject_ignore_index, remove_ignore_index
label_desc: Use image node_id 4 for calling the TestBinaryJaccardIndex obj's underlying member method code with example usage: obj.test_binary_jaccard_index_dtype_cpu(inputs, dtype) without return types