def kwargupdate(defaults, options):
    """
    Modify or extend a kwarg dict.

    Parameters
    ----------
    defauts: dict
        The dictionary containing the default values

    options: dict
        The dictionary containing the modified or new values

    Returns
    -------
    A merged kwarg dictionary

    """
    if options is None:
        options = {}
    for key, value in defaults.items():
        if key not in options.keys():
            options[key] = value
    return options
