def put_if_empty(self, key, value):
if self.has_data_for_key(key):<EOL><INDENT>return False<EOL><DEDENT>self.put_data(key, value)<EOL>return True<EOL>
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.