def when_imported(name, *hooks):
 global finder
 finder.when_imported(name, *hooks)

def when_imported ( name , * hooks ) : global finder finder . when_imported ( name , * hooks )
call c{hook} when module named c{name} is first imported .