def _handle_default(k, v=None):
    this_mapping = deepcopy(DEFAULTS[k])
    if v is not None:
        if isinstance(v, dict):
            this_mapping.update(v)
        else:
            for key in this_mapping.keys():
                this_mapping[key] = v
    return this_mapping
Helper to avoid dicts as default keyword arguments
dataset/ETHPy150Open mne-tools/mne-python/mne/defaults.py/_handle_default