@log_debug
    def get_sub_component(self, level_type, component_list, component_type):
        matches = [x for x in component_list
                   if level_type in x.level_types]

        if len(matches) > 0:
            component = self.rng.choice(matches)
        else:
            error_message = "No {0} for type {1} in {2}".format(
                component_type,
                level_type,
                component_list)
            self.logger.error(error_message)
            raise RuntimeError(error_message)

        return component
Returns a brush for the color.
dataset/ETHPy150Open tuturto/pyherc/src/pyherc/generators/level/generator.py/LevelGeneratorFactory.get_sub_component--crossover with--dataset/ETHPy150Open OpenCobolIDE/OpenCobolIDE/open_cobol_ide/extlibs/pyqode/core/modes/pygments_sh.py/PygmentsSH._get_brush