code: def _load_pyfunc(path):
      from mlflow import pyfunc
      from mlflow.entities.param import Param
      from mlflow.utils.model_utils import (
          _get_flavor_configuration,
      )
  
      pyfunc_flavor_conf = _get_flavor_configuration(
          model_path=path, flavor_name=pyfunc.FLAVOR_NAME
      )
      parameters_path = os.path.join(
          path, pyfunc_flavor_conf["parameters_path"]
      )
      with open(parameters_path) as f:
          parameters = yaml.safe_load(f)
  
          prompt_parameters_as_params = [
              Param(key=key, value=value)
              for key, value in parameters["prompt_parameters"].items()
          ]
          model_parameters_as_params = [
              Param(key=key, value=value)
              for key, value in parameters["model_parameters"].items()
          ]
  
          return _PromptlabModel(
              prompt_template=parameters["prompt_template"],
              prompt_parameters=prompt_parameters_as_params,
              model_parameters=model_parameters_as_params,
              model_route=parameters["model_route"],
          )
  
file_path: mlflow/mlflow/promptlab/__init__.py
imports: import os
  import re
  from typing import List
  import yaml
  from mlflow.exceptions import MlflowException
  from mlflow.version import VERSION
label_desc: Use image node_id 1 for calling a global function with example usage: _load_pyfunc(path) and returns: _PromptlabModel