code: def test_log_with_extra_pip_requirements(basic_model, tmp_path):
      expected_mlflow_version = _mlflow_major_version_string()
      default_requirements = (
          mlflow.sentence_transformers.get_default_pip_requirements()
      )
      requirements_file = tmp_path.joinpath("requirements.txt")
      requirements_file.write_text("effective-package")
      with mlflow.start_run():
          mlflow.sentence_transformers.log_model(
              basic_model,
              "model",
              extra_pip_requirements=str(requirements_file),
          )
          _assert_pip_requirements(
              mlflow.get_artifact_uri("model"),
              [
                  expected_mlflow_version,
                  *default_requirements,
                  "effective-package",
              ],
          )
      with mlflow.start_run():
          mlflow.sentence_transformers.log_model(
              basic_model,
              "model",
              extra_pip_requirements=[
                  f"-r {requirements_file}",
                  "useful-package",
              ],
          )
          _assert_pip_requirements(
              mlflow.get_artifact_uri("model"),
              [
                  expected_mlflow_version,
                  *default_requirements,
                  "effective-package",
                  "useful-package",
              ],
          )
      with mlflow.start_run():
          mlflow.sentence_transformers.log_model(
              basic_model,
              "model",
              extra_pip_requirements=[
                  f"-c {requirements_file}",
                  "constrained-pkg",
              ],
          )
          _assert_pip_requirements(
              mlflow.get_artifact_uri("model"),
              [
                  expected_mlflow_version,
                  *default_requirements,
                  "constrained-pkg",
                  "-c constraints.txt",
              ],
              ["effective-package"],
          )
  
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 12 for calling a global function with example usage: test_log_with_extra_pip_requirements(basic_model, tmp_path) without return types