def foo(self, types, keys):
    for type in types:
        self.delays[type] = self.manager.dict()
for key in keys:
    self.delays[type].setdefault(key, 0)
print('The delay is {}'.format(self.delays[type][key]))
KeyError when attempting to access a key value from a nested Manager.dict