code: def from_config(cls, config: ConfigBase):
      return cls(config.__name__, canonical_path(config), config)
  
imports: import collections
  import contextlib
  import itertools
  import json
  import os
  import typing
  from pytext.config import ConfigBase, ExportConfig, PyTextConfig
  from pytext.config.component import Registry
  from pytext.config.serialize import config_to_json
  from pytext.utils.file_io import PathManager
  from sphinx.ext.napoleon import GoogleDocstring
  from sphinx.pycode import ModuleAnalyzer
label_desc: Use image node_id 1 for calling the Config obj's underlying member method code with example usage: obj.from_config(cls, config) and returns: cls