class_docstr: An Arrow Dataset for reading record batches from an input stream.
  Currently supported input streams are a socket client or stdin.
docstr: Create an ArrowDataset from an input stream.
  
  Args:
      endpoints: A `tf.string` tensor, Python list or scalar string defining the
                  input stream.
                  `endpoints` supports the following formats:
                  - "host:port": IPv4 address (default)
                  - "tcp://<host:port>": IPv4 address,
                  - "unix://<path>": local path as unix socket address,
                  - "fd://<number>": STDIN or file descriptor number. For
                      STDIN, use "fd://0" or "fd://-".
      columns: A list of column indices to be used in the Dataset
      output_types: Tensor dtypes of the output tensors
      output_shapes: TensorShapes of the output tensors or None to
                      infer partial
      batch_size: Batch size of output tensors, setting a batch size here
                  will create batched tensors from Arrow memory and can be more
                  efficient than using tf.data.Dataset.batch().
                  NOTE: batch_size does not need to be set if batch_mode='auto'
      batch_mode: Mode of batching, supported strings:
                  "keep_remainder" (default, keeps partial batch data),
                  "drop_remainder" (discard partial batch data),
                  "auto" (size to number of records in Arrow record batch)
docstr_tok: ["Create","an","ArrowDataset","from","an","input","stream",".","Args",":","endpoints",":","A","`","tf.string","`","tensor",",","Python","list","or","scalar","string","defining","the","input","stream",".","`","endpoints","`","supports","the","following","formats",":","-","``","host",":","port","''",":","IPv4","address","(","default",")","-","``","tcp",":","\/\/","<","host",":","port",">","''",":","IPv4","address",",","-","``","unix",":","\/\/","<","path",">","''",":","local","path","as","unix","socket","address",",","-","``","fd",":","\/\/","<","number",">","''",":","STDIN","or","file","descriptor","number",".","For","STDIN",",","use","``","fd",":","\/\/0","''","or","``","fd",":","\/\/-","''",".","columns",":","A","list","of","column","indices","to","be","used","in","the","Dataset","output_types",":","Tensor","dtypes","of","the","output","tensors","output_shapes",":","TensorShapes","of","the","output","tensors","or","None","to","infer","partial","batch_size",":","Batch","size","of","output","tensors",",","setting","a","batch","size","here","will","create","batched","tensors","from","Arrow","memory","and","can","be","more","efficient","than","using","tf.data.Dataset.batch","(",")",".","NOTE",":","batch_size","does","not","need","to","be","set","if","batch_mode='auto'","batch_mode",":","Mode","of","batching",",","supported","strings",":","``","keep_remainder","''","(","default",",","keeps","partial","batch","data",")",",","``","drop_remainder","''","(","discard","partial","batch","data",")",",","``","auto","''","(","size","to","number","of","records","in","Arrow","record","batch",")"]
code: def __init__(
      self,
      endpoints,
      columns,
      output_types,
      output_shapes=None,
      batch_size=None,
      batch_mode="keep_remainder",
  ):
      """Create an ArrowDataset from an input stream.
  
      Args:
          endpoints: A `tf.string` tensor, Python list or scalar string defining the
                      input stream.
                      `endpoints` supports the following formats:
                      - "host:port": IPv4 address (default)
                      - "tcp://<host:port>": IPv4 address,
                      - "unix://<path>": local path as unix socket address,
                      - "fd://<number>": STDIN or file descriptor number. For
                          STDIN, use "fd://0" or "fd://-".
          columns: A list of column indices to be used in the Dataset
          output_types: Tensor dtypes of the output tensors
          output_shapes: TensorShapes of the output tensors or None to
                          infer partial
          batch_size: Batch size of output tensors, setting a batch size here
                      will create batched tensors from Arrow memory and can be more
                      efficient than using tf.data.Dataset.batch().
                      NOTE: batch_size does not need to be set if batch_mode='auto'
          batch_mode: Mode of batching, supported strings:
                      "keep_remainder" (default, keeps partial batch data),
                      "drop_remainder" (discard partial batch data),
                      "auto" (size to number of records in Arrow record batch)
      """
      endpoints = tf.convert_to_tensor(
          endpoints, dtype=dtypes.string, name="endpoints"
      )
      super().__init__(
          partial(core_ops.io_arrow_stream_dataset, endpoints),
          columns,
          output_types,
          output_shapes,
          batch_size,
          batch_mode,
      )
  
imports: from functools import partial
  import io
  from itertools import chain
  import os
  import socket
  import threading
  import tempfile
  import tensorflow
  from tensorflow import dtypes
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.util import structure
  from tensorflow_io.python.ops import core_ops
label_desc: Use image node_id 1 to create a new ArrowStreamDataset object from inherited base classes: ArrowBaseDataset with example: obj = ArrowStreamDataset(endpoints, columns, output_types, output_shapes, batch_size, batch_mode)