class_docstr: ArrowDatasetTest
class_docstr_tok: ["ArrowDatasetTest"]
docstr: Test that using map then batch produces correct output. This will create
  a map_and_batch_dataset_op that calls GetNext after end_of_sequence=true
code: def test_map_and_batch(self):
      """Test that using map then batch produces correct output. This will create
      a map_and_batch_dataset_op that calls GetNext after end_of_sequence=true
      """
      import tensorflow_io.arrow as arrow_io
  
      truth_data = TruthData(
          [list(range(10))], (tf.dtypes.int32,), (tf.TensorShape([]),)
      )
      batch = self.make_record_batch(truth_data)
      dataset = arrow_io.ArrowDataset.from_record_batches(
          batch, truth_data.output_types, truth_data.output_shapes
      )
  
      dataset = dataset.map(lambda x: x).batch(4)
  
      expected = truth_data.data[0]
      for result_tensors in dataset:
          results = result_tensors.numpy()
          for x in results:
              self.assertTrue(
                  expected, "Dataset has more output than expected"
              )
              self.assertEqual(x, expected[0])
              expected.pop(0)
  
imports: from collections import namedtuple
  import io
  import os
  import socket
  import tempfile
  import threading
  import pytest
  import pyarrow
  import numpy.testing
  import tensorflow
  import tensorflow_io
label_desc: Use image node_id 17 for calling the ArrowDatasetTest obj's underlying member method code with example usage: obj.test_map_and_batch() without return types