class_docstr: Base class for all adaptation methods. This class does not define specific configuration keys, but only provides
  some common helper methods.
  
  Args:
      architecture (str, optional): The type of adaptation method defined by the configuration.
class_docstr_tok: ["Base","class","for","all","adaptation","methods",".","This","class","does","not","define","specific","configuration","keys",",","but","only","provides","some","common","helper","methods",".","Args",":","architecture","(","str",",","optional",")",":","The","type","of","adaptation","method","defined","by","the","configuration","."]
docstr: Creates a config class from a Python dict.
code: def from_dict(cls, config):
      """Creates a config class from a Python dict."""
      if isinstance(config, AdapterConfig):
          return config
  
      # the constructor does not accept additional kwargs, so add them separately
      defined_kwargs, new_kwargs = {}, {}
      for k, v in config.items():
          if k in cls.__dataclass_fields__.keys():
              defined_kwargs[k] = v
          else:
              new_kwargs[k] = v
      obj = cls(**defined_kwargs)
      for k, v in new_kwargs.items():
          setattr(obj, k, v)
      return obj
  
imports: import logging
  from collections.abc import Mapping
  from dataclasses import FrozenInstanceError, asdict, dataclass, field, replace
  from typing import List, Optional, Union
  from ..utils import resolve_adapter_config
label_desc: Use image node_id 10 for calling the AdapterConfig obj's underlying member method code with example usage: obj.from_dict(cls, config) and returns: obj, config