<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from __future__ import print_function <EOL> import sys <EOL> if sys . version_info >= ( <NUM_LIT:3> , ) : <EOL> from collections import UserList <EOL> else : <EOL> from UserList import UserList <EOL> class HIDError ( Exception ) : <EOL> "<STR_LIT>" <EOL> pass <EOL> def simple_decorator ( decorator ) : <EOL> """<STR_LIT>""" <EOL> def new_decorator ( funct_target ) : <EOL> """<STR_LIT>""" <EOL> decorated = decorator ( funct_target ) <EOL> decorated . __name__ = funct_target . __name__ <EOL> decorated . __doc__ = funct_target . __doc__ <EOL> decorated . __dict__ . update ( funct_target . __dict__ ) <EOL> return decorated <EOL> new_decorator . __name__ = decorator . __name__ <EOL> new_decorator . __doc__ = decorator . __doc__ <EOL> new_decorator . __dict__ . update ( decorator . __dict__ ) <EOL> return new_decorator <EOL> @ simple_decorator <EOL> def logging_decorator ( func ) : <EOL> """<STR_LIT>""" <EOL> def you_will_never_see_this_name ( * args , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> print ( '<STR_LIT>' % func . __name__ ) <EOL> result = func ( * args , ** kwargs ) <EOL> print ( '<STR_LIT>' % func . __name__ ) <EOL> return result <EOL> return you_will_never_see_this_name <EOL> def synchronized ( lock ) : <EOL> """<STR_LIT>""" <EOL> @ simple_decorator <EOL> def wrap ( function_target ) : <EOL> """<STR_LIT>""" <EOL> def new_function ( * args , ** kw ) : <EOL> """<STR_LIT>""" <EOL> lock . acquire ( ) <EOL> try : <EOL> return function_target ( * args , ** kw ) <EOL> finally : <EOL> lock . release ( ) <EOL> return new_function <EOL> return wrap <EOL> class ReadOnlyList ( UserList ) : <EOL> "<STR_LIT>" <EOL> def __init__ ( self , any_list ) : <EOL> UserList . __init__ ( self , any_list ) <EOL> def __setitem__ ( self , index , value ) : <EOL> raise ValueError ( "<STR_LIT>" ) </s>
