class_docstr: Write log messages to console periodically.
  
  It tracks an average meter for each metric, which is the average value since last ``clear()`` till now.
  The display format for each metric is ``<name> <latest_value> (<average_value>)``.
  
  Non-single-number metrics are auto skipped.
class_docstr_tok: ["Write","log","messages","to","console","periodically",".","It","tracks","an","average","meter","for","each","metric",",","which","is","the","average","value","since","last","``","clear","(",")","``","till","now",".","The","display","format","for","each","metric","is","``","<","name",">","<","latest_value",">","(","<","average_value",">",")","``",".","Non-single-number","metrics","are","auto","skipped","."]
code: def clear(self) -> None:
      super().clear()
      # Clear average meters
      self.metric_counts: Dict[str, int] = defaultdict(int)
      self.metric_sums: Dict[str, float] = defaultdict(float)
  
imports: from __future__ import annotations
  import logging
  from collections import defaultdict
  from enum import IntEnum
  from pathlib import Path
  from typing import TYPE_CHECKING, Any, Callable, Dict, Generic, List, Sequence, Set, Tuple, TypeVar
  import numpy
  import pandas
  from qlib.log import get_module_logger
label_desc: Use image node_id 2 for calling the ConsoleWriter obj's underlying member method code with example usage: obj.clear() without return types