docstr: Add a baal.utils.metric.Metrics or torchmetrics.Metric to the Model.
  
  Args:
      name (str): name of the metric.
      initializer (Callable): lambda to initialize a new instance of a
                              Union[Metrics, TorchMetric].
code: def add_metric(
      self,
      name: str,
      initializer: Callable[[], Union[Metrics, TorchMetric]],
  ):
      """
      Add a baal.utils.metric.Metrics or torchmetrics.Metric to the Model.
  
      Args:
          name (str): name of the metric.
          initializer (Callable): lambda to initialize a new instance of a
                                  Union[Metrics, TorchMetric].
      """
      self.metrics["test_" + name] = initializer()
      self.metrics["train_" + name] = initializer()
  
file_path: baal/baal/metrics/mixin.py
imports: from typing import Callable, Dict, Any, Optional, DefaultDict, Union
  import numpy
  from torchmetrics import Metric
  from baal.utils.metrics import Metrics
label_desc: Use image node_id 2 for calling the MetricMixin obj's underlying member method code with example usage: obj.add_metric(name, initializer) without return types