fromabcimportABC,abstractmethodfromalgo_modimportbuild_algo_modfromsearcherimportbuild_searcherfromdata_processorimportbuild_data_processordefbuild_processor(config):processor_type=config.get("processor_type")ifprocessor_type=="algo_mod":returnbuild_algo_mod(config)elifprocessor_type=="searcher":returnbuild_searcher(config)elifprocessor_type=="data_processor":returnbuild_data_processor(config)else:raiseNotImplemented("processor_type {} not implemented.".format(processor_type))classBaseProcessor(ABC):@abstractmethoddef__init__(self,config):pass@abstractmethoddefprocess(self,input_data):pass