'set can assign versatile options from `Options.versatileOptions()`
with a new value, use `init()` for the others.
Arguments
`dic`
either a dictionary or a key. In the latter
case, val must be provided
`val`
value for key
`warn`
bool, print a warning if the option cannot be changed
and is therefore omitted
This method will be most probably used with the ``opts`` attribute of
a `CMAEvolutionStrategy` instance.'

def set(self, dic, val=None, warn=True):

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