code: def put_if_empty(self, key, value):
          
          if self.has_data_for_key(key):
              return False
          self.put_data(key, value)
          return True
docs: Atomically write data only if the key is not already set.
  
          :param bytes key: Key to check/set.
          :param bytes value: Arbitrary data.
          :return: Boolean whether key/value was set.