code: def aggregate(
      self,
      compute_sample: bool = False,
      reduction: MetricReduction | str | None = None,
  ) -> Sequence[torch.Tensor | tuple[torch.Tensor, torch.Tensor]]:
      data = self.get_buffer()
      if not isinstance(data, torch.Tensor):
          raise ValueError(
              "the data to aggregate must be PyTorch Tensor."
          )
  
      results: list[
          torch.Tensor | tuple[torch.Tensor, torch.Tensor]
      ] = []
      f, not_nans = do_metric_reduction(
          data, reduction or self.reduction
      )
      f = compute_f_beta_score(f, self.beta)
      if self.get_not_nans:
          results.append((f, not_nans))
      else:
          results.append(f)
  
      return results
  
file_path: MONAI/monai/metrics/f_beta_score.py
imports: from __future__ import annotations
  from collections.abc import Sequence
  import torch
  from monai.metrics.utils import do_metric_reduction, ignore_background
  from monai.utils import MetricReduction
  from .metric import CumulativeIterationMetric
label_desc: Use image node_id 3 for calling the FBetaScore obj's underlying member method code with example usage: obj.aggregate(compute_sample, reduction) and returns: results