def merge_config(config, data):
    """
    Merge a new set of configuration requirements into a base configuration.

    :param config: the base configuration to update. This configuration
        is modified in-situ.
    :param data: The new configuration data to merge into the configuration.
    """
    for option in ['requires', 'sources']:
        value = data.pop(option, [])
        if value:
            config.setdefault(option, []).extend(value)
    config.update(data)
