class_docstr: An example implementation of a writable datasource for testing.
  
  Examples:
      >>> import ray
      >>> from ray.data.datasource import DummyOutputDatasource
      >>> output = DummyOutputDatasource() # doctest: +SKIP
      >>> ray.data.range(10).write_datasource(output) # doctest: +SKIP
      >>> assert output.num_ok == 1 # doctest: +SKIP
class_docstr_tok: ["An","example","implementation","of","a","writable","datasource","for","testing",".","Examples",":",">",">",">","import","ray",">",">",">","from","ray.data.datasource","import","DummyOutputDatasource",">",">",">","output","=","DummyOutputDatasource","(",")","#","doctest",":","+SKIP",">",">",">","ray.data.range","(","10",")",".write_datasource","(","output",")","#","doctest",":","+SKIP",">",">",">","assert","output.num_ok","==","1","#","doctest",":","+SKIP"]
code: def write(
      self,
      blocks: Iterable[Block],
      ctx: TaskContext,
      **write_args,
  ) -> WriteResult:
      tasks = []
      if not self.enabled:
          raise ValueError("disabled")
      for b in blocks:
          tasks.append(self.data_sink.write.remote(b))
      ray.get(tasks)
      return "ok"
  
imports: import warnings
  from typing import Any, Callable, Iterable, List, Optional
  import numpy
  import ray
  from ray.data._internal.execution.interfaces import TaskContext
  from ray.data._internal.util import _check_pyarrow_version
  from ray.data.block import Block, BlockAccessor, BlockMetadata
  from ray.data.context import DataContext
  from ray.types import ObjectRef
  from ray.util.annotations import Deprecated, DeveloperAPI, PublicAPI
label_desc: Use image node_id 2 for calling the DummyOutputDatasource obj's underlying member method code with example usage: obj.write(blocks, ctx) and returns: str