class_docstr: Tester class for `BinaryFairness` metrich overriding some defaults.
docstr: Test if a metric can be used with half precision tensors on gpu.
  
  Args:
      preds: torch tensor with predictions
      target: torch tensor with targets
      metric_module: the metric module to test
      metric_functional: the metric functional to test
      metric_args: dict with additional arguments used for class initialization
      dtype: dtype to run test with
      kwargs_update: Additional keyword arguments that will be passed with preds and
          target when running update on the metric.
code: def run_precision_test_gpu(
      preds: Tensor,
      target: Tensor,
      metric_module: Optional[Metric] = None,
      metric_functional: Optional[Callable] = None,
      metric_args: Optional[dict] = None,
      dtype: torch.dtype = torch.half,
      **kwargs_update: Any,
  ) -> None:
      """Test if a metric can be used with half precision tensors on gpu.
  
      Args:
          preds: torch tensor with predictions
          target: torch tensor with targets
          metric_module: the metric module to test
          metric_functional: the metric functional to test
          metric_args: dict with additional arguments used for class initialization
          dtype: dtype to run test with
          kwargs_update: Additional keyword arguments that will be passed with preds and
              target when running update on the metric.
  
      """
      metric_args = metric_args or {}
      functional_metric_args = {
          k: v
          for k, v in metric_args.items()
          if k in inspect.signature(metric_functional).parameters
      }
  
      _assert_dtype_support(
          metric_module(**metric_args)
          if metric_module is not None
          else None,
          partial(metric_functional, **functional_metric_args)
          if metric_functional is not None
          else None,
          preds,
          target,
          device="cuda",
          dtype=dtype,
          **kwargs_update,
      )
  
imports: import inspect
  from functools import partial
  from typing import Any, Callable, Dict, Optional
  from unittest import mock
  import numpy
  import pandas
  import pytest
  import torch
  from fairlearn.metrics import MetricFrame, selection_rate, true_positive_rate
  from scipy.special import expit
  from torch import Tensor
  from torchmetrics import Metric
  from torchmetrics.classification.group_fairness import BinaryFairness
  from torchmetrics.functional.classification.group_fairness import binary_fairness
  from torchmetrics.utilities.imports import _PYTHON_LOWER_3_8
  from unittests import THRESHOLD
  from unittests.classification.inputs import _group_cases
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester, _assert_dtype_support, inject_ignore_index, remove_ignore_index_groups
  from unittests.helpers.testers import _assert_allclose
  from unittests.helpers.testers import _assert_requires_grad
  from unittests.helpers.testers import _assert_tensor
label_desc: Use image node_id 3 for calling the BinaryFairnessTester obj's underlying member method code with example usage: obj.run_precision_test_gpu(preds, target, metric_module, metric_functional, metric_args, dtype) without return types