class_docstr: Evaluator that calculates the metric `accuracy` from predictions and
  labels. Alternatively, this evaluator can return arbitrary dummy metrics
  set in the config.
  
  Default prefix: Toy
  
  Metrics:
      - accuracy (float): The classification accuracy. Only when
          `dummy_metrics` is None.
      - size (int): The number of test samples. Only when `dummy_metrics`
          is None.
  
      If `dummy_metrics` is set as a dict in the config, it will be
      returned as the metrics and override `accuracy` and `size`.
class_docstr_tok: ["Evaluator","that","calculates","the","metric","`","accuracy","`","from","predictions","and","labels",".","Alternatively",",","this","evaluator","can","return","arbitrary","dummy","metrics","set","in","the","config",".","Default","prefix",":","Toy","Metrics",":","-","accuracy","(","float",")",":","The","classification","accuracy",".","Only","when","`","dummy_metrics","`","is","None",".","-","size","(","int",")",":","The","number","of","test","samples",".","Only","when","`","dummy_metrics","`","is","None",".","If","`","dummy_metrics","`","is","set","as","a","dict","in","the","config",",","it","will","be","returned","as","the","metrics","and","override","`","accuracy","`","and","`","size","`","."]
code: def __init__(
      self,
      collect_device: str = "cpu",
      prefix: Optional[str] = "Toy",
      dummy_metrics: Optional[Dict] = None,
  ):
      super().__init__(collect_device=collect_device, prefix=prefix)
      self.dummy_metrics = dummy_metrics
  
file_path: mmocr/tests/test_evaluation/test_evaluator/test_multi_datasets_evaluator.py
imports: import math
  from typing import Dict, List, Optional
  from unittest import TestCase
  import numpy
  from mmengine.evaluator import BaseMetric
  from mmengine.registry import METRICS, DefaultScope
  from mmengine.structures import BaseDataElement
  from mmocr.evaluation import MultiDatasetsEvaluator
label_desc: Use image node_id 1 to create a new ToyMetric object from inherited base classes: BaseMetric with example: obj = ToyMetric(collect_device, prefix, dummy_metrics)