code: def test_from_raw_data(y, target_names, target_names_expected):
      y_true, y_pred = y
      cm = plot.ClassificationReport.from_raw_data(
          y_true, y_pred, target_names=target_names
      )
  
      assert cm._get_data() == {
          "class": "sklearn_evaluation.plot.ClassificationReport",
          "matrix": [[0.5, 0.5, 0.5, 4.0], [0.5, 0.5, 0.5, 4.0]],
          "keys": ["precision", "recall", "f1-score", "support"],
          "target_names": target_names_expected,
          "version": __version__,
      }
  
file_path: sklearn-evaluation/tests/test_classification_report.py
imports: import pytest
  import numpy
  from sklearn_evaluation import plot, __version__
  import warnings
label_desc: Use image node_id 2 for calling a global function with example usage: test_from_raw_data(y, target_names, target_names_expected) without return types