def METHOD_NAME(self, path, data, atomic=False, mode="w"):
    self.create_parent_folder(path)
    if atomic:
        with self.open_atomic(path, mode) as file:
            file.write(data)
    else:
        from a2ml.api.utils import fsclient
        self.remove_file(path)
        with fsclient.open_file(path, mode) as file:
            try:
                file.write(data)
            finally:
                file.flush()  # flush file buffers
                os.fsync(file.fileno())
    self.read_text_file(path)