code: def set_default(self, key, default=None):
          
          try:
              return self.get_value(key)
          except KeyError:
              self.insert(key, default)
              return default
docs: T.set_default(k[,d]) -> T.get(k,d), also set T[k]=d if k not in T