code: def load_config(filename: str) -> PyTextConfig:
      """
      Load a PyText configuration file from a file path.
      See pytext.config.pytext_config for more info on configs.
      """
      with PathManager.open(filename) as file:
          config_json = json.loads(file.read())
      if "config" not in config_json:
          return pytext_config_from_json(config_json)
      return pytext_config_from_json(config_json["config"])
  
file_path: pytext/pytext/__init__.py
imports: import json
  import logging
  import uuid
  from functools import lru_cache
  from typing import Callable, Mapping, Optional
  import numpy
  from caffe2.python import workspace
  from caffe2.python.predictor import predictor_exporter
  from pytext.data.sources.data_source import DataSource
  from pytext.task import load
  from pytext.task.new_task import NewTask
  from pytext.utils.file_io import PathManager, register_http_url_handler
  from pytext.workflow import _set_cuda
  from .builtin_task import register_builtin_tasks
  from .config import pytext_config_from_json, PyTextConfig
  from .utils.onnx import CAFFE2_DB_TYPE, convert_caffe2_blob_name
label_desc: Use image node_id 2 for calling a global function with example usage: load_config(filename) and returns: pytext_config_from_json, pytext_config_from_json