code: def _add_values_to_matrix(m, ax):
      # this (y, x) may sound counterintuitive. The reason is that
      # in a matrix cell (i, j) is in row=i and col=j, translating that
      # to an x, y plane (which matplotlib uses to plot), we need to use
      # i as the y coordinate (how many steps down) and j as the x coordinate
      # how many steps to the right.
      for (y, x), v in np.ndenumerate(m):
          try:
              label = "{:.2}".format(v)
          except Exception:
              label = v
          ax.text(
              x,
              y,
              label,
              horizontalalignment="center",
              verticalalignment="center",
          )
  
imports: import json
  from pathlib import Path
  import numpy
  import matplotlib.pyplot
  from sklearn.metrics import confusion_matrix
  from sklearn_evaluation import __version__
  from ..telemetry import SKLearnEvaluationLogger
  from ..plot.matplotlib import bar
  from ..metrics import precision_at
  from ..None import compute
  from ..util import is_column_vector, is_row_vector, default_heatmap
  from sklearn_evaluation.plot.plot import AbstractPlot, AbstractComposedPlot
  from ..plot import _matrix
  from ploomber_core.exceptions import modify_exceptions
label_desc: Use image node_id 6 for calling a global function with example usage: _add_values_to_matrix(m, ax) without return types