'initialize one or several options.
Arguments
`dict_or_str`
a dictionary if ``val is None``, otherwise a key.
If `val` is provided `dict_or_str` must be a valid key.
`val`
value for key
Details
Only known keys are accepted. Known keys are in `Options.defaults()`'

def init(self, dict_or_str, val=None, warn=True):

    dic = dict_or_str
    if (val is not None):
        dic = {dict_or_str: val}
    for (key, val) in list(dic.items()):
        if (key not in Options.defaults()):
            if warn:
                print((('Warning    in    cma.Options.init():    key    ' + str(key)) + '    ignored'))
        else:
            self[key] = val
    return self
