code: def test_model_logging_and_inference(basic_model):
      artifact_path = "sentence_transformer"
      with mlflow.start_run():
          model_info = mlflow.sentence_transformers.log_model(
              model=basic_model, artifact_path=artifact_path
          )
  
      model = mlflow.sentence_transformers.load_model(
          model_info.model_uri
      )
  
      encoded_single = model.encode(
          "Encodings provide a fixed width output regardless of input size."
      )
      encoded_multi = model.encode(
          [
              "Just a small town girl",
              "livin in a lonely world",
              "she took the midnight train",
              "goin anywhere",
          ]
      )
  
      assert isinstance(encoded_single, np.ndarray)
      assert len(encoded_single) == 384
      assert isinstance(encoded_multi, np.ndarray)
      assert len(encoded_multi) == 4
      assert all(len(x) == 384 for x in encoded_multi)
  
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 7 for calling a global function with example usage: test_model_logging_and_inference(basic_model) without return types