code: def compile_stan_model_simplified(path):
      """A more flexible way to load compile stan model with a path provided
      Parameters
      ----------
      path
  
      Returns
      -------
  
      """
      source_path = os.path.abspath(path)
      source_filename, source_file_ext = os.path.splitext(source_path)
      compiled_path = "{}.pkl".format(source_filename)
  
      # compile if stan source has changed
      if not os.path.isfile(compiled_path) or os.path.getmtime(
          compiled_path
      ) < os.path.getmtime(source_path):
          logger.info(
              "First time in running stan model:{}. Expect 3 - 5 minutes for compilation.".format(
                  source_filename
              )
          )
          sm = CmdStanModel(stan_file=source_path)
  
          with open(compiled_path, "wb") as f:
              pickle.dump(sm, f, protocol=pickle.HIGHEST_PROTOCOL)
  
      return compiled_path
  
file_path: orbit/orbit/utils/stan.py
imports: import pickle
  import importlib_resources
  import os
  from cmdstanpy import CmdStanModel
  from orbit.constants.constants import CompiledStanModelPath
  from ..utils.logger import get_logger
label_desc: Use image node_id 2 for calling a global function with example usage: compile_stan_model_simplified(path) and returns: compiled_path