code: def load_model_config(model_dir, file_name="config.json"):
      if is_local_path(model_dir):  # load from local path
          with open(os.path.join(model_dir, file_name), "r") as f:
              config = json.load(f)
      else:  # load from remote path
          with tempfile.TemporaryDirectory() as tmpdirname:
              local_path = os.path.join(tmpdirname, file_name)
              remote_path = os.path.join(model_dir, file_name)
              get_remote_file_to_local(
                  remote_path=remote_path, local_path=local_path
              )
              with open(local_path, "r") as f:
                  config = json.load(f)
      return config
  
file_path: BigDL/python/orca/tutorial/NCF/utils.py
imports: import os
  import argparse
  import json
  import tempfile
  from bigdl.dllib.utils.file_utils import is_local_path
  from bigdl.orca.data.file import put_local_file_to_remote, get_remote_file_to_local
  from bigdl.orca import init_orca_context, stop_orca_context, OrcaContext
label_desc: Use image node_id 6 for calling a global function with example usage: load_model_config(model_dir, file_name) and returns: config