code: def _classification_report(
      y_true,
      y_pred,
      *,
      target_names=None,
      sample_weight=None,
      zero_division=0,
  ):
      report = sk_classification_report(
          y_true,
          y_pred,
          target_names=target_names,
          sample_weight=sample_weight,
          zero_division=zero_division,
          output_dict=True,
      )
  
      report = {
          k: v
          for k, v in report.items()
          if "avg" not in k and k != "accuracy"
      }
      n_classes = len(report.keys())
  
      target_names = target_names or [str(i) for i in range(n_classes)]
  
      keys = list(report[target_names[0]].keys())
      rows = [list(row.values()) for row in report.values()]
      matrix = np.array(rows)
  
      return matrix, keys, target_names
  
imports: from warnings import warn
  from pathlib import Path
  import json
  import numpy
  import matplotlib.pyplot
  from sklearn.metrics import classification_report
  from ..telemetry import SKLearnEvaluationLogger
  from sklearn_evaluation.plot.classification import _add_values_to_matrix
  from sklearn_evaluation.util import default_heatmap
  from sklearn_evaluation.plot.plot import Plot
  from sklearn_evaluation.plot import _matrix
  from sklearn_evaluation import __version__
  from ploomber_core.exceptions import modify_exceptions
label_desc: Use image node_id 2 for calling a global function with example usage: _classification_report(y_true, y_pred) and returns: matrix,  keys,  target_names