def setdefault(self, key, default=None, kind=None):
        try:
            val = super(modict, self).__getitem__(key)
            return kind(val[-1]) if kind else val[-1]
        except Exception:
            self.append(key, default)
        return default
If key is in the dictionary, return the last (most recent) element
dataset/ETHPy150Open ioflo/ioflo/ioflo/aid/odicting.py/modict.setdefault