code: def format_metrics(self, metrics, stage):
      metrics_str = ", ".join(
          [
              "{}={:.4f}".format(k, v)
              for k, v in metrics.items()
              if k not in ("epoch", "steps")
          ]
      )
      if stage == "train":
          return f"[{stage}] {metrics_str}"
      elif stage == "valid":
          return f"[{stage}] {metrics_str}"
      else:
          raise ValueError(f"Unknown stage: {stage}")
  
file_path: tez/tez/callbacks/progress.py
imports: from tqdm.auto import tqdm
  from tez.callbacks import Callback
label_desc: Use image node_id 4 for calling the Progress obj's underlying member method code with example usage: obj.format_metrics(metrics, stage) and returns: str, stage, str, metrics_str, str, stage, str, metrics_str