<s> """<STR_LIT>""" <EOL> import sys <EOL> import types <EOL> disable_lazy_imports = False <EOL> if '<STR_LIT>' in sys . modules : <EOL> disable_lazy_imports = True <EOL> class LazyImport ( types . ModuleType ) : <EOL> """<STR_LIT>""" <EOL> def __getattribute__ ( self , x ) : <EOL> name = object . __getattribute__ ( self , '<STR_LIT>' ) <EOL> __import__ ( name ) <EOL> module = sys . modules [ name ] <EOL> class LoadedLazyImport ( types . ModuleType ) : <EOL> __getattribute__ = module . __getattribute__ <EOL> __repr__ = module . __repr__ <EOL> object . __setattr__ ( self , '<STR_LIT>' , LoadedLazyImport ) <EOL> return module . __getattribute__ ( x ) <EOL> def __repr__ ( self ) : <EOL> return "<STR_LIT>" % object . __getattribute__ ( self , '<STR_LIT>' ) <EOL> if disable_lazy_imports : <EOL> lazy_doc = """<STR_LIT>""" <EOL> if '<STR_LIT>' in sys . modules : <EOL> lazy_doc = """<STR_LIT>""" <EOL> lazy_doc += LazyImport . __doc__ <EOL> class LazyImport ( object ) : <EOL> __doc__ = lazy_doc <EOL> def __init__ ( self , x ) : <EOL> __import__ ( x ) <EOL> self . module = sys . modules [ x ] <EOL> def __getattr__ ( self , x ) : <EOL> return self . module . __getattribute__ ( x ) </s>
