code: def setdefault(self, key, value):
          
          with self.lock:
              if key in self:
                  return self.getitem(key)
  
              else:
                  self.setitem(key, value)
                  return value
docs: Atomic store conditional.  Stores _value_ into dictionary
          at _key_, but only if _key_ does not already exist in the dictionary.
          Returns the old value found or the new value.