code: def test_log_model_with_code_paths(basic_model):
      artifact_path = "model"
      with mlflow.start_run(), mock.patch(
          "mlflow.sentence_transformers._add_code_from_conf_to_system_path"
      ) as add_mock:
          mlflow.sentence_transformers.log_model(
              basic_model, artifact_path, code_paths=[__file__]
          )
          model_uri = mlflow.get_artifact_uri(artifact_path)
          _compare_logged_code_paths(
              __file__,
              model_uri,
              mlflow.sentence_transformers.FLAVOR_NAME,
          )
          mlflow.sentence_transformers.load_model(model_uri)
          add_mock.assert_called()
  
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 15 for calling a global function with example usage: test_log_model_with_code_paths(basic_model) without return types