class_docstr: Numpy datasource, for reading and writing Numpy files.
code: def _read_stream(
      self, f: "pyarrow.NativeFile", path: str
  ) -> Iterator[Block]:
      # TODO(ekl) Ideally numpy can read directly from the file, but it
      # seems like it requires the file to be seekable.
      buf = BytesIO()
      data = f.readall()
      buf.write(data)
      buf.seek(0)
      yield BlockAccessor.batch_to_block(
          {
              "data": np.load(
                  buf, allow_pickle=True, **self.numpy_load_args
              )
          }
      )
  
file_path: ray/python/ray/data/datasource/numpy_datasource.py
imports: from io import BytesIO
  from typing import TYPE_CHECKING, Any, Dict, Iterator, List, Optional, Union
  import numpy
  from ray.data.block import Block, BlockAccessor
  from ray.data.datasource.file_based_datasource import FileBasedDatasource
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 2 for calling the NumpyDatasource obj's underlying member method code with example usage: obj._read_stream(f, path) without return types