def METHOD_NAME(self, variational_state):
    if self._init is False:
        self._init_output()
    _time = time.time()
    binary_data = serialization.to_bytes(variational_state.variables)
    if self._tar:
        save_binary_to_tar(
            self._tar_file, binary_data, str(self._file_step) + ".mpack"
        )
    else:
        with open(self._prefix + str(self._file_step) + ".mpack", "wb") as f:
            f.write(binary_data)
    self._file_step += 1
    self._runtime_taken += time.time() - _time