#NEWLINE# def get_extractor( coarse , fine ) : #NEWLINE# #INDENT# log . debug ( "getting coarse extractor for '{}'" . format ( coarse ) ) #NEWLINE# try : #NEWLINE# #INDENT# coarse_extractor = importlib . import_module ( ( ( __package__ + '.' ) + question_types [ coarse ] ) ) #NEWLINE# #UNINDENT# except ( ImportError , KeyError ) : #NEWLINE# #INDENT# log . warn ( "Extractor for coarse type '{}' not implemented" . format ( coarse ) ) #NEWLINE# raise NoExtractorError ( coarse ) #NEWLINE# #UNINDENT# return coarse_extractor . get_extractor ( coarse , fine )