code: def prediction_target_scatter(
      eval_df, _builtin_metrics, artifacts_dir
  ):
      """
      This example custom artifact generates and saves a scatter plot to ``artifacts_dir`` that
      visualizes the relationship between the predictions and targets for the given model to a
      file as an image artifact.
      """
      plt.scatter(eval_df["prediction"], eval_df["target"])
      plt.xlabel("Targets")
      plt.ylabel("Predictions")
      plt.title("Targets vs. Predictions")
      plot_path = os.path.join(
          artifacts_dir, "example_scatter_plot.png"
      )
      plt.savefig(plot_path)
      return {"example_scatter_plot_artifact": plot_path}
  
file_path: mlflow/examples/evaluation/evaluate_with_custom_metrics.py
imports: import os
  import matplotlib.pyplot
  import numpy
  from sklearn.datasets import fetch_california_housing
  from sklearn.linear_model import LinearRegression
  from sklearn.model_selection import train_test_split
  import mlflow
  from mlflow.models import infer_signature, make_metric
label_desc: Use image node_id 3 for calling a global function with example usage: prediction_target_scatter(eval_df, _builtin_metrics, artifacts_dir) and returns: dict