class_docstr: Handles the normalization of [`PretrainedConfig`] attribute names, allowing to access attributes in a general way.
  
  Attributes:
      config ([`PretrainedConfig`]):
          The config to normalize.
class_docstr_tok: ["Handles","the","normalization","of","[","`","PretrainedConfig","`","]","attribute","names",",","allowing","to","access","attributes","in","a","general","way",".","Attributes",":","config","(","[","`","PretrainedConfig","`","]",")",":","The","config","to","normalize","."]
code: def __getattr__(self, attr_name):
      if attr_name == "config":
          return super().__getattr__(attr_name)
  
      try:
          attr_name = super().__getattribute__(attr_name.upper())
      except (
          AttributeError
      ):  # e.g. in the NormalizedTextAndVisionConfig case
          pass
  
      attr_name = attr_name.split(".")
      leaf_attr_name = attr_name[-1]
      config = self.config
      for attr in attr_name[:-1]:
          config = getattr(config, attr)
  
      attr = getattr(config, leaf_attr_name, None)
  
      # If the attribute was not specified manually, try to fallback on the attribute_map.
      if attr is None:
          attribute_map = getattr(self.config, "attribute_map", {})
          attr = getattr(
              self.config, attribute_map.get(leaf_attr_name, ""), None
          )
  
      if attr is None:
          raise AttributeError(
              f'Could not find the attribute named "{leaf_attr_name}" in the normalized config.'
          )
      return attr
  
imports: import functools
  from typing import Callable, Dict, Type, Union
  from transformers import PretrainedConfig
label_desc: Use image node_id 3 for calling the NormalizedConfig obj's underlying member method code with example usage: obj.__getattr__(attr_name) and returns: attr, super