docs: def get_and_set(self, value):
          '''
          Atomically sets the value to `value` and returns the old value.
  
          :param value: The value to set.
          '''
          with self._reference.get_lock():
              oldval = self._reference.value
              self._reference.value = value
              return oldval