code: def default_metric_name_template(metric_info: Dict[str, Any]):
      add_task = metric_info.get("task_label", None) is not None
      add_phase = metric_info.get("phase_name", None) is not None
      add_experience = (
          metric_info.get("experience_id", None) is not None
      )
      add_stream = metric_info.get("stream_name", None) is not None
  
      if "metric_name" not in metric_info:
          raise RuntimeError(
              "Key metric_name missing from value dictionary."
          )
  
      result_template = "{metric_name}/"
      if add_phase:
          result_template += "{phase_name}_phase/"
  
      if add_stream:
          result_template += "{stream_name}_stream/"
  
      if add_task:
          result_template += "Task{task_label:03}/"
  
      if add_experience:
          result_template += "Exp{experience_id:03}/"
  
      return result_template[:-1]
  
file_path: avalanche/avalanche/evaluation/metric_utils.py
imports: from typing import Dict, Optional, Union, Iterable, Sequence, Tuple, TYPE_CHECKING, List, Callable, Any
  import matplotlib.pyplot
  import numpy
  from matplotlib.axes import Axes
  from numpy import ndarray, arange
  from torch import Tensor
label_desc: Use image node_id 8 for calling a global function with example usage: default_metric_name_template(metric_info) and returns: result_template