def get_or_set(self, key, value):
        try:
            return self[key]
        except KeyError:
            self[key] = value
            return value
Either gets the value associated with key or set it
dataset/ETHPy150Open duerrp/pyexperiment/pyexperiment/utils/HierarchicalMapping.py/HierarchicalMapping.get_or_set