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