class_docstr: This class implements the RecMetricComputation for Accuracy.
  
  The constructor arguments are defined in RecMetricComputation.
  See the docstring of RecMetricComputation for more detail.
  
  Args:
      threshold (float): If provided, computes accuracy metrics cutting off at
          the specified threshold.
code: def _compute(self) -> List[MetricComputationReport]:
      reports = [
          MetricComputationReport(
              name=MetricName.ACCURACY,
              metric_prefix=MetricPrefix.LIFETIME,
              value=compute_accuracy(
                  cast(torch.Tensor, self.accuracy_sum),
                  cast(torch.Tensor, self.weighted_num_samples),
              ),
          ),
          MetricComputationReport(
              name=MetricName.ACCURACY,
              metric_prefix=MetricPrefix.WINDOW,
              value=compute_accuracy(
                  self.get_window_state("accuracy_sum"),
                  self.get_window_state("weighted_num_samples"),
              ),
          ),
      ]
      return reports
  
file_path: torchrec/torchrec/metrics/accuracy.py
imports: from typing import Any, cast, Dict, List, Optional, Type
  import torch
  from torchrec.metrics.metrics_namespace import MetricName, MetricNamespace, MetricPrefix
  from torchrec.metrics.rec_metric import MetricComputationReport, RecMetric, RecMetricComputation, RecMetricException
label_desc: Use image node_id 3 for calling the AccuracyMetricComputation obj's underlying member method code with example usage: obj._compute() and returns: reports