def METHOD_NAME(self, key: str, value: Union[List[Any], dict]) -> dict:
    """Update or insert values into key list or dict.
    Args:
        key: Key to value to upsert.
        value: Value to upsert by.
    Returns:
        Updated config.
    """
    to_update = deepcopy(self.get(key, value))
    dpath.merge(to_update, value, flags=dpath.MERGE_REPLACE)
    self.add(key, to_update)
    return self.sync()