code: def compare_and_set(self, expected, updated):
          
          return self._encode_invoke(atomic_long_compare_and_set_codec, expected=expected,
                                     updated=updated)
docs: Atomically sets the value to the given updated value only if the current value == the expected value.
  
          :param expected: (long), the expected value.
          :param updated: (long), the new value.
          :return: (bool), ``true`` if successful; or ``false`` if the actual value was not equal to the expected value.