<s> import sys <EOL> class _Registry ( dict ) : <EOL> __file__ = __file__ <EOL> __name__ = __name__ <EOL> def __init__ ( self ) : <EOL> dict . __init__ ( self ) <EOL> def __hash__ ( self ) : <EOL> return hash ( self . freeze ( self ) ) <EOL> def __getitem__ ( self , key ) : <EOL> try : <EOL> return dict . __getitem__ ( self , key ) <EOL> except KeyError : <EOL> raise KeyError ( '<STR_LIT>' . format ( key ) ) <EOL> def freeze ( self , o ) : <EOL> if isinstance ( o , dict ) : <EOL> return frozenset ( { k : self . freeze ( v ) for k , v in o . items ( ) } . items ( ) ) <EOL> elif isinstance ( o , list ) : <EOL> return tuple ( map ( self . freeze , o ) ) <EOL> return o <EOL> @ property <EOL> def beat_schedule ( self ) : <EOL> from celery . schedules import crontab <EOL> return { <EOL> '<STR_LIT>' . format ( name ) : { <EOL> '<STR_LIT:args>' : [ name ] , <EOL> '<STR_LIT>' : crontab ( ** inst . run_at ) , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> for name , inst <EOL> in self . items ( ) <EOL> } <EOL> sys . modules [ __name__ ] = _Registry ( ) </s>
