code: def run(raw_data):
      # Get predictions and explanations for each data point
      data = pd.read_json(raw_data, orient="records")
      # Make prediction
      predictions = automl_model.predict(data)
      # Setup for inferencing explanations
      automl_explainer_setup_obj = automl_setup_model_explanations(
          automl_model, X_test=data, task="regression"
      )
      # Retrieve model explanations for engineered explanations
      engineered_local_importance_values = scoring_explainer.explain(
          automl_explainer_setup_obj.X_test_transform
      )
      engineered_local_importance_values = convert_matrix(
          engineered_local_importance_values
      )
  
      # Retrieve model explanations for raw explanations
      raw_local_importance_values = scoring_explainer.explain(
          automl_explainer_setup_obj.X_test_transform, get_raw=True
      )
      raw_local_importance_values = convert_matrix(
          raw_local_importance_values
      )
  
      # You can return any data type as long as it is JSON-serializable
      return {
          "predictions": predictions.tolist(),
          "engineered_local_importance_values": engineered_local_importance_values,
          "raw_local_importance_values": raw_local_importance_values,
      }
  
file_path: MachineLearningNotebooks/how-to-use-azureml/automated-machine-learning/regression-explanation-featurization/score_explain.py
imports: import pandas
  import joblib
  from azureml.core.model import Model
  from azureml.train.automl.runtime.automl_explain_utilities import automl_setup_model_explanations
  import scipy
label_desc: Use image node_id 4 for calling a global function with example usage: run(raw_data) and returns: dict