def __new__(mcs, name, bases, attrs):
baseMaps = [getattr(base, '<STR_LIT>', {}) for base in bases][::-<NUM_LIT:1>]<EOL>baseMaps.append(attrs.get('<STR_LIT>', {}))<EOL>initMap = {}<EOL>for baseMap in baseMaps:<EOL><INDENT>initMap.update(baseMap)<EOL>for key in initMap:<EOL><INDENT>if initMap[key] is None:<EOL><INDENT>del(initMap[key])<EOL><DEDENT><DEDENT><DEDENT>attrs['<STR_LIT>'] = initMap<EOL>baseMasks = reduce(set.union, (getattr(base, '<STR_LIT>', set()) for base in bases))<EOL>maskKeys = set.union(baseMasks, attrs.get('<STR_LIT>', set()))<EOL>if maskKeys:<EOL><INDENT>attrs['<STR_LIT>'] = maskKeys<EOL><DEDENT>return type.__new__(mcs, name, bases, attrs)<EOL>
Build a new subclass of AttributeMapper