code: def parse_config(config_json):
      """
      Parse PyTextConfig object from parameter string or parameter file
      """
      if "config" in config_json:
          config_json = config_json["config"]
      return pytext_config_from_json(config_json)
  
imports: from enum import Enum
  from typing import Any, Dict, List, Tuple, Type, Union
  from pytext.common.utils import eprint
  from .component import Registry
  from .config_adapter import upgrade_to_latest
  from .pytext_config import PyTextConfig
label_desc: Use image node_id 18 for calling a global function with example usage: parse_config(config_json) and returns: pytext_config_from_json