'@type key: bytes
@param key: The key to lookup
@param value: The value to associate with key if key is not already
associated with a value.'

def setdefault(self, key, value):

    if (key not in self):
        self[key] = value
        return value
    return self[key]
