code: def from_config(cls, config, **kwargs):
      if type(config) in cls._model_mapping.keys():
          model_class = _get_model_class(config, cls._model_mapping)
          return model_class._from_config(config, **kwargs)
  
      raise ValueError(
          f"Unrecognized configuration class {config.__class__} for this kind of AutoModel: {cls.__name__}.\n"
          f"Model type should be one of {', '.join(c.__name__ for c in cls._model_mapping.keys())}."
      )
  
imports: import importlib
  from collections import OrderedDict
  from .configuration_auto import AutoConfig, model_type_to_module_name, replace_list_option_in_docstrings
  from .dynamic import get_class_from_dynamic_module
  from fastNLP.transformers.torch.configuration_utils import PretrainedConfig
  from fastNLP.transformers.torch.file_utils import copy_func
  from fastNLP.core.log import logger
label_desc: Use image node_id 2 for calling the _BaseAutoModelClass obj's underlying member method code with example usage: obj.from_config(cls, config) and returns: model_class