def METHOD_NAME(self, group, val_dict, set_if_not_exists=False, verbose=False):
    """ Add key-value pairs to a group. Existing key-value pairs will be overwritten
        if specified in val_dict, but not deleted.
    Args:
        group: The name of the group.
        val_dict: A dictionary with key-value pairs to be set for the group.
        set_if_not_exists: Whether to set a key-value pair in a group if the key does not currently exist in the group.
    """
    if not hasattr(self, group):
        raise KeyError('No group in CNMFParams named {0}'.format(group))
    d = getattr(self, group)
    for k, v in val_dict.items():
        if k not in d and not set_if_not_exists:
            if verbose:
                logging.warning(
                    "NOT setting value of key {0} in group {1}, because no prior key existed...".format(k, group))
        else:
            if np.any(d[k] != v):
                logging.warning(
                    "Changing key {0} in group {1} from {2} to {3}".format(k, group, d[k], v))
            d[k] = v