code: def _load_runnable_branch(
      file_path: Union[Path, str], model_type: str
  ):
      """Load the model
  
      Args:
          file_path: Path to file to load the model from.
          model_type: Type of the model to load.
      """
      from langchain.schema.runnable import RunnableBranch
  
      # Convert file to Path object.
      load_path = (
          Path(file_path) if isinstance(file_path, str) else file_path
      )
      if not load_path.exists() or not load_path.is_dir():
          raise MlflowException(
              f"File {load_path} must exist and must be a directory "
              "in order to load runnable with steps."
          )
  
      branches_conf_file = load_path / _RUNNABLE_BRANCHES_FILE_NAME
      if not branches_conf_file.exists():
          raise MlflowException(
              f"File {branches_conf_file} must exist in order to load runnable with steps."
          )
      branches_conf = _load_from_yaml(branches_conf_file)
      branches_path = load_path / _BRANCHES_FOLDER_NAME
      if not branches_path.exists() or not branches_path.is_dir():
          raise MlflowException(
              f"Folder {branches_path} must exist and must be a directory "
              "in order to load runnable with steps."
          )
  
      branches = []
      for branch in os.listdir(branches_path):
          # load model from the folder of the branch
          if branch == _DEFAULT_BRANCH_NAME:
              default_branch_path = branches_path / _DEFAULT_BRANCH_NAME
              default = _load_model_from_path(
                  default_branch_path,
                  branches_conf.get(_DEFAULT_BRANCH_NAME),
              )
          else:
              branch_tuple = []
              for i in range(2):
                  config = branches_conf.get(f"{branch}-{i}")
                  runnable = _load_model_from_path(
                      os.path.join(branches_path, branch, str(i)),
                      config,
                  )
                  branch_tuple.append(runnable)
              branches.append(tuple(branch_tuple))
  
      # default branch must be the last branch
      branches.append(default)
  
      return RunnableBranch(*branches)
  
file_path: mlflow/mlflow/langchain/runnables.py
imports: import os
  from pathlib import Path
  from typing import Union
  import cloudpickle
  import yaml
  from mlflow.exceptions import MlflowException
  from mlflow.langchain.utils import _BASE_LOAD_KEY, _CONFIG_LOAD_KEY, _MODEL_DATA_FOLDER_NAME, _MODEL_DATA_KEY, _MODEL_DATA_PKL_FILE_NAME, _MODEL_DATA_YAML_FILE_NAME, _MODEL_LOAD_KEY, _MODEL_TYPE_KEY, _RUNNABLE_LOAD_KEY, _UNSUPPORTED_MODEL_ERROR_MESSAGE, _load_base_lcs, _load_from_json, _load_from_pickle, _load_from_yaml, _save_base_lcs, _validate_and_wrap_lc_model, base_lc_types, custom_type_to_loader_dict, lc_runnable_branch_type, lc_runnable_with_steps_types, lc_runnables_types, picklable_runnable_types
label_desc: Use image node_id 5 for calling a global function with example usage: _load_runnable_branch(file_path, model_type) and returns: RunnableBranch