code: def test_model_pyfunc_predict_with_params(basic_model, tmp_path):
      sentence = "hello world and hello mlflow"
      params = {"batch_size": 16}
  
      model_path = tmp_path / "model1"
      signature = infer_signature(sentence, params=params)
      mlflow.sentence_transformers.save_model(
          basic_model, model_path, signature=signature
      )
      loaded_pyfunc = pyfunc.load_model(model_uri=model_path)
      embedding_dim = basic_model.get_sentence_embedding_dimension()
  
      emb0 = loaded_pyfunc.predict(sentence, params)
      assert emb0.shape == (1, embedding_dim)
  
      with pytest.raises(
          MlflowException,
          match=r"Incompatible types for param 'batch_size'",
      ):
          loaded_pyfunc.predict(sentence, {"batch_size": "16"})
  
      model_path = tmp_path / "model2"
      mlflow.sentence_transformers.save_model(
          basic_model,
          model_path,
          signature=infer_signature(
              sentence, params={"invalid_param": "value"}
          ),
      )
      loaded_pyfunc = pyfunc.load_model(model_uri=model_path)
      with pytest.raises(
          MlflowException,
          match=r"Received invalid parameter value for `params` argument",
      ):
          loaded_pyfunc.predict(
              sentence, {"invalid_param": "random_value"}
          )
  
      model_path = tmp_path / "model3"
      mlflow.sentence_transformers.save_model(basic_model, model_path)
      loaded_pyfunc = pyfunc.load_model(model_uri=model_path)
      with mock.patch(
          "mlflow.models.utils._logger.warning"
      ) as mock_warning:
          loaded_pyfunc.predict(sentence, params)
      mock_warning.assert_called_with(
          "`params` can only be specified at inference time if the model signature defines a params "
          "schema. This model does not define a params schema. Ignoring provided params: "
          "['batch_size']"
      )
  
imports: import json
  import os
  from unittest import mock
  import numpy
  import pandas
  import pytest
  import yaml
  from pyspark.sql import SparkSession
  from pyspark.sql.types import ArrayType, DoubleType
  from sentence_transformers import SentenceTransformer
  import mlflow
  import mlflow.pyfunc.scoring_server
  import mlflow.sentence_transformers
  from mlflow import pyfunc
  from mlflow.exceptions import MlflowException
  from mlflow.models import Model, infer_signature
  from mlflow.models.utils import _read_example
  from mlflow.store.artifact.s3_artifact_repo import S3ArtifactRepository
  from mlflow.utils.environment import _mlflow_conda_env
  from tests.helper_functions import _assert_pip_requirements, _compare_logged_code_paths, _mlflow_major_version_string, assert_register_model_called_with_local_model_path, pyfunc_serve_and_score_model
label_desc: Use image node_id 18 for calling a global function with example usage: test_model_pyfunc_predict_with_params(basic_model, tmp_path) without return types