code: def test_model_deployment(
      spark_model_iris, model_path, spark_custom_env
  ):
      mlflow.spark.save_model(
          spark_model_iris.model,
          path=model_path,
          conda_env=spark_custom_env,
          sample_input=spark_model_iris.spark_df,
      )
  
      scoring_response = score_model_in_sagemaker_docker_container(
          model_uri=model_path,
          data=json.dumps(
              {
                  "dataframe_split": spark_model_iris.pandas_df.to_dict(
                      orient="split"
                  ),
              }
          ),
          content_type=mlflow.pyfunc.scoring_server.CONTENT_TYPE_JSON,
          flavor=mlflow.mleap.FLAVOR_NAME,
      )
      np.testing.assert_array_almost_equal(
          spark_model_iris.predictions,
          np.array(json.loads(scoring_response.content)["predictions"]),
          decimal=4,
      )
  
imports: import json
  import os
  import sys
  from unittest import mock
  import mleap.version
  import numpy
  import pandas
  import pyspark
  import pytest
  from packaging.version import Version
  from pyspark.ml.pipeline import Pipeline
  from pyspark.ml.wrapper import JavaModel
  import mlflow
  import mlflow.mleap
  from mlflow.models import Model
  from mlflow.tracking.artifact_utils import _download_artifact_from_uri
  from mlflow.utils.file_utils import TempDir
  from tests.helper_functions import score_model_in_sagemaker_docker_container
  from tests.pyfunc.test_spark import get_spark_session
  from tests.spark.test_spark_model_export import assert_register_model_called_with_local_model_path, iris_df, model_path, spark_custom_env, spark_model_iris
label_desc: Use image node_id 3 for calling a global function with example usage: test_model_deployment(spark_model_iris, model_path, spark_custom_env) without return types