<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from . has_traits import MetaHasTraits , MetaHasTraitsObject <EOL> class MetaCategory ( MetaHasTraits ) : <EOL> def __new__ ( cls , class_name , bases , class_dict ) : <EOL> if len ( bases ) > <NUM_LIT:2> : <EOL> raise TypeError , "<STR_LIT>" <EOL> MetaCategoryObject ( cls , class_name , bases , class_dict , True ) <EOL> if len ( bases ) == <NUM_LIT:2> : <EOL> category_class = bases [ <NUM_LIT:1> ] <EOL> for name , value in class_dict . items ( ) : <EOL> if not hasattr ( category_class , name ) : <EOL> setattr ( category_class , name , value ) <EOL> del class_dict [ name ] <EOL> return type . __new__ ( cls , class_name , bases , class_dict ) <EOL> class MetaCategoryObject ( MetaHasTraitsObject ) : <EOL> def add_traits_meta_data ( self , bases , class_dict , base_traits , <EOL> class_traits , instance_traits , prefix_traits , <EOL> listeners , view_elements ) : <EOL> if len ( bases ) == <NUM_LIT:2> : <EOL> bases [ <NUM_LIT:1> ] . _add_trait_category ( base_traits , class_traits , <EOL> instance_traits , prefix_traits , listeners , <EOL> view_elements ) <EOL> else : <EOL> MetaHasTraitsObject . add_traits_meta_data ( self , bases , <EOL> class_dict , base_traits , class_traits , instance_traits , <EOL> prefix_traits , listeners , view_elements ) <EOL> class Category ( object ) : <EOL> """<STR_LIT>""" <EOL> __metaclass__ = MetaCategory </s>
