code: def _instantiate_rules(self, attr):
      dct = {}
      for base in type(self).mro():
          rules_map = getattr(base, attr, {})
          for type_, rule_classes in rules_map.items():
              new = [rule_cls(self) for rule_cls in rule_classes]
              dct.setdefault(type_, []).extend(new)
      return dct
  
imports: from contextlib import contextmanager
  from parso._compatibility import use_metaclass
label_desc: Use image node_id 2 for calling the Normalizer obj's underlying member method code with example usage: obj._instantiate_rules(attr) and returns: dct