def pop(self, key, *pa, **kwa):
        """
        If key exists remove and return the indexed element of the key element
        list else return the optional following positional argument.
        If the optional positional arg is not provided and key does not exit
        then raise KeyError. If provided the index keyword arg determines
        which value in the key element list to return. Default is last element.
        """
        index = kwa.get('index', -1)
        try:
            val = super(modict, self).pop(key)
        except __HOLE__:
            if pa:
                return pa[0]
            else:
                raise

        return val[index]
dataset/ETHPy150Open ioflo/ioflo/ioflo/aid/odicting.py/modict.pop