class_docstr: Base class for all top-k accuracies plugin metrics
class_docstr_tok: ["Base","class","for","all","top-k","accuracies","plugin","metrics"]
code: def reset(self, strategy=None) -> None:
      if self._reset_at == "stream" or strategy is None:
          self._metric.reset()
      else:
          self._metric.reset(phase_and_task(strategy)[1])
  
imports: from typing import TYPE_CHECKING, List, Union, Dict
  import torch
  from torch import Tensor
  import torchmetrics
  from torchmetrics.functional import accuracy
  from avalanche.evaluation import Metric, GenericPluginMetric
  from avalanche.evaluation.metrics.mean import Mean
  from avalanche.evaluation.metric_utils import phase_and_task
  from collections import defaultdict
  from packaging import version
label_desc: Use image node_id 2 for calling the TopkAccuracyPluginMetric obj's underlying member method code with example usage: obj.reset(strategy) without return types