class_docstr: Create and update states for computing group stats tp, fp, tn and fn.
code: def _create_states(self, num_groups: int) -> None:
      default = lambda: torch.zeros(num_groups, dtype=torch.long)
      self.add_state("tp", default(), dist_reduce_fx="sum")
      self.add_state("fp", default(), dist_reduce_fx="sum")
      self.add_state("tn", default(), dist_reduce_fx="sum")
      self.add_state("fn", default(), dist_reduce_fx="sum")
  
imports: from typing import Any, Dict, List, Optional, Sequence, Tuple, Union
  import torch
  from torch import Tensor
  from typing_extensions import Literal
  from torchmetrics.functional.classification.group_fairness import _binary_groups_stat_scores, _compute_binary_demographic_parity, _compute_binary_equal_opportunity
  from torchmetrics.functional.classification.stat_scores import _binary_stat_scores_arg_validation
  from torchmetrics.metric import Metric
  from torchmetrics.utilities import rank_zero_warn
  from torchmetrics.utilities.imports import _MATPLOTLIB_AVAILABLE
  from torchmetrics.utilities.plot import _AX_TYPE, _PLOT_OUT_TYPE
label_desc: Use image node_id 1 for calling the _AbstractGroupStatScores obj's underlying member method code with example usage: obj._create_states(num_groups) without return types