def del_key(self, key):
        """Delete the given key. Properly deals with nested keys."""
        if '.' in key:
            key, remainder = key.split('.', 1)
            try:
                del self[key][remainder]
            except __HOLE__:
                self[key].del_key(remainder)
        else:
            del self[key]
dataset/ETHPy150Open calliope-project/calliope/calliope/utils.py/AttrDict.del_key