def METHOD_NAME(
    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