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 on_write_failed(
      self,
      write_results: List[ObjectRef[WriteResult]],
      error: Exception,
  ) -> None:
      self.num_failed += 1
  
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 4 for calling the DummyOutputDatasource obj's underlying member method code with example usage: obj.on_write_failed(write_results, error) without return types