def get_extractor(coarse, fine):
    log.debug("getting coarse extractor for '{}'".format(coarse))
    # http://stackoverflow.com/questions/301134/dynamic-module-import-in-python
    try:
        coarse_extractor = importlib.import_module(__package__+'.'+question_types[coarse])
    except (ImportError, __HOLE__):
        log.warn("Extractor for coarse type '{}' not implemented".format(coarse))
        raise NoExtractorError(coarse)

    return coarse_extractor.get_extractor(coarse, fine)
dataset/ETHPy150Open jcelliott/inquire/inquire/extraction/extractors.py/get_extractor