def inject_config(consumer, properties):
    for prop in properties:
        try:
            if ":" in prop:
                property_name, value = prop.split(':')[1], _section_value_map[prop]
            else:
                property_name, value = prop, _value_map[prop]
        except KeyError:
            log.error("No value found for configuration value {} in consumer {}", prop, consumer.__name__)
            continue
        try:
            old_value = getattr(consumer, property_name)
            if old_value == value:
                return
            log.info("Updating config {} from {} to {} in {}.", property_name, old_value, value, consumer.__name__)
        except __HOLE__:
            log.info("Setting config {}: {} in {}.", property_name, value, consumer.__name__)
        setattr(consumer, property_name, value)
    if hasattr(consumer, '_on_configured'):
        consumer._on_configured()
dataset/ETHPy150Open genzgd/Lampost-Mud/lampost/context/config.py/inject_config