code: def build_reporters(
      m: Dict[str, float]
  ) -> Dict[str, r.AbstractReporter]:
      """Returns a dict of namespace to reporter."""
  
      # This reporter keeps all metrics in an internal dictionary of metric name
      # (string) to a list of metric values.
      #
      # The "stepped()" function here is a convenience, here in the early days of
      # this library, that wraps every value that reaches the MemoryReporter - say,
      # the number 10.5 - in a dictionary that looks like
      #
      # {"step": step_idx, "value": 10.5}
      #
      # This lets you access the value of the step later.
      mem = r.MemoryReporter(m).stepped()
  
      # The "tqdm()" function returns a LoggingReporter() implementation that's
      # able to log above a tqdm progress bar. If you simply called
      # r.LoggingReporter(), the reporter would log to sys.stdout.
      logging = r.LoggingReporter.tqdm()
  
      mlf = MLFlowReporter()
  
      # This is a new, compound reporter. When you log to this compound reporter,
      # it will turn around and pass metrics to the memory and logging reporters.
      base = mem.plus(logging, mlf)
  
      # The final step here is to call "map_values" with a function that will
      # accept each step and value as it's reported, and transform the value before
      # passing into all of our underlying reporters. to_metric, in this case,
      # simply extracts the numpy() argument if it exists on the supplied value.
      # This allows you to report tensors directly without calling numpy() before
      # reporting them.
      return base.map_values(lambda step, v: u.to_metric(v))
  
file_path: caliban/tutorials/uv-metrics/mnist.py
imports: import warnings
  from typing import Dict
  import mlflow
  import mlflow.keras
  import tensorflow
  import uv.reporter
  import uv.util
  from absl import app
  from uv.mlflow.reporter import MLFlowReporter
  import cli
label_desc: Use image node_id 1 for calling a global function with example usage: build_reporters(m) and returns: base