code: def test_pyfunc_serve_and_score(tmp_path, monkeypatch):
      mlflow.set_tracking_uri(tmp_path.joinpath("mlruns").as_uri())
      monkeypatch.chdir(tmp_path)
      model_data_info = save_or_log_tf_model_by_mlflow128(
          tmp_path, "iris", "log_model"
      )
      model_uri = f"runs:/{model_data_info.run_id}/model"
  
      resp = pyfunc_serve_and_score_model(
          model_uri=model_uri,
          data=model_data_info.inference_df,
          content_type=pyfunc_scoring_server.CONTENT_TYPE_JSON,
          extra_args=["--env-manager", "local"],
      )
      actual = pd.DataFrame(json.loads(resp.content)["predictions"])[
          "class_ids"
      ].values
      expected = (
          model_data_info.expected_results_df["predictions"]
          .map(iris_data_utils.SPECIES.index)
          .values
      )
      np.testing.assert_array_almost_equal(actual, expected)
  
imports: import collections
  import json
  import os
  import iris_data_utils
  import numpy
  import pandas
  import pandas.testing
  import pytest
  import tensorflow
  import mlflow
  import mlflow.pyfunc.scoring_server
  from mlflow import pyfunc
  from mlflow.store.artifact.s3_artifact_repo import S3ArtifactRepository
  from mlflow.tensorflow import _TF2Wrapper
  from mlflow.utils.conda import get_or_create_conda_env
  from mlflow.utils.environment import _mlflow_conda_env
  from tests.helper_functions import assert_array_almost_equal, pyfunc_serve_and_score_model
label_desc: Use image node_id 9 for calling a global function with example usage: test_pyfunc_serve_and_score(tmp_path, monkeypatch) without return types