def merge(base, other):
    """Merge one app config (from a dict, file, or filename) into another.

    If the given config is a filename, it will be appended to the list
    of files to monitor for "autoreload" changes.
    """
    _if_filename_register_autoreload(other)

    # Load other into base
    for section, value_map in reprconf.Parser.load(other).items():
        if not isinstance(value_map, dict):
            raise ValueError(
                'Application config must include section headers, but the '
                "config you tried to merge doesn't have any sections. "
                'Wrap your config in another dict with paths as section '
                "headers, for example: {'/': config}.",
            )
        base.setdefault(section, {}).update(value_map)
Merge one app config (from a dict, file, or filename) into another.

    If the given config is a filename, it will be appended to the list
    of files to monitor for "autoreload" changes.
    
cherrypy/_cpconfig.py