code: def _compute(states: Dict[str, torch.Tensor]) -> torch.Tensor:
      return compute_accuracy(
          states["accuracy_sum"],
          states["weighted_num_samples"],
      )
  
imports: import unittest
  from typing import Dict, Iterable, Type, Union
  import torch
  from torch import no_grad
  from torchrec.metrics.accuracy import AccuracyMetric, compute_accuracy
  from torchrec.metrics.metrics_config import DefaultTaskInfo
  from torchrec.metrics.rec_metric import RecComputeMode, RecMetric
  from torchrec.metrics.test_utils import metric_test_helper, rec_metric_value_test_launcher, RecTaskInfo, TestMetric
label_desc: Use image node_id 2 for calling the TestAccuracyMetric obj's underlying member method code with example usage: obj._compute(states) and returns: compute_accuracy