class_docstr: A class that directly prints to console.
code: def log_metrics(
      self,
      metrics: Mapping[str, float],
      step: Optional[int] = None,
      prefix: Optional[str] = None,
  ) -> None:  # noqa: D102
      if not self.track_metrics:
          return
  
      self.write(f"Step: {step}")
      for key, value in flatten_dictionary(
          dictionary=metrics, prefix=prefix
      ).items():
          if not self.metric_filter or self.metric_filter.match(key):
              self.write(f"Metric: {key} = {value}")
  
imports: import logging
  import re
  from collections import defaultdict
  from typing import Any, Iterable, List, Mapping, MutableMapping, Optional, Pattern, Union
  from tqdm.auto import tqdm
  from ..utils import flatten_dictionary
label_desc: Use image node_id 4 for calling the ConsoleResultTracker obj's underlying member method code with example usage: obj.log_metrics(metrics, step, prefix) without return types