class_docstr: The Top-k Accuracy metric. This is a standalone metric.
  It is defined using torchmetrics.functional accuracy with top_k
class_docstr_tok: ["The","Top-k","Accuracy","metric",".","This","is","a","standalone","metric",".","It","is","defined","using","torchmetrics.functional","accuracy","with","top_k"]
docstr: Retrieves the running top-k accuracy for all tasks.
  
  Calling this method will not change the internal state of the metric.
  
  :return: A dict of running top-k accuracies for each task label,
      where each value is a float value between 0 and 1.
docstr_tok: ["Retrieves","the","running","top-k","accuracy","for","all","tasks",".","Calling","this","method","will","not","change","the","internal","state","of","the","metric",".",":","return",":","A","dict","of","running","top-k","accuracies","for","each","task","label",",","where","each","value","is","a","float","value","between","0","and","1","."]
code: def result(self) -> Dict[int, float]:
      """
      Retrieves the running top-k accuracy for all tasks.
  
      Calling this method will not change the internal state of the metric.
  
      :return: A dict of running top-k accuracies for each task label,
          where each value is a float value between 0 and 1.
      """
      return {k: v.result() for k, v in self._topk_acc_dict.items()}
  
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 5 for calling the TopkAccuracy obj's underlying member method code with example usage: obj.result() and returns: unknown