docstr: Aggregate states that are lists and return final states.
docstr_tok: ["Aggregate","states","that","are","lists","and","return","final","states","."]
code: def _final_state(self) -> Tuple[Tensor, Tensor, Tensor, Tensor]:
      """Aggregate states that are lists and return final states."""
      tp = dim_zero_cat(self.tp)
      fp = dim_zero_cat(self.fp)
      tn = dim_zero_cat(self.tn)
      fn = dim_zero_cat(self.fn)
      return tp, fp, tn, fn
  
imports: from typing import Any, Callable, List, Optional, Tuple, Type, Union
  import torch
  from torch import Tensor
  from typing_extensions import Literal
  from torchmetrics.classification.base import _ClassificationTaskWrapper
  from torchmetrics.functional.classification.stat_scores import _binary_stat_scores_arg_validation, _binary_stat_scores_compute, _binary_stat_scores_format, _binary_stat_scores_tensor_validation, _binary_stat_scores_update, _multiclass_stat_scores_arg_validation, _multiclass_stat_scores_compute, _multiclass_stat_scores_format, _multiclass_stat_scores_tensor_validation, _multiclass_stat_scores_update, _multilabel_stat_scores_arg_validation, _multilabel_stat_scores_compute, _multilabel_stat_scores_format, _multilabel_stat_scores_tensor_validation, _multilabel_stat_scores_update
  from torchmetrics.metric import Metric
  from torchmetrics.utilities.data import dim_zero_cat
  from torchmetrics.utilities.enums import ClassificationTask
label_desc: Use image node_id 3 for calling the _AbstractStatScores obj's underlying member method code with example usage: obj._final_state() and returns: tp,  fp,  tn,  fn