#NEWLINE# def discover_post_import_hooks( group ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# import pkg_resources #NEWLINE# #UNINDENT# except ImportError : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# for entrypoint in pkg_resources . iter_entry_points ( group = group ) : #NEWLINE# #INDENT# callback = _create_import_hook_from_entrypoint ( group ) #NEWLINE# register_post_import_hook ( callback , entrypoint . name )