code: def _generate_tables(self, files):
      for file_idx, file in enumerate(
          itertools.chain.from_iterable(files)
      ):
          with open(file, "rb") as f:
              try:
                  for batch_idx, record_batch in enumerate(
                      pa.ipc.open_stream(f)
                  ):
                      pa_table = pa.Table.from_batches([record_batch])
                      # Uncomment for debugging (will print the Arrow table size and elements)
                      # logger.warning(f"pa_table: {pa_table} num rows: {pa_table.num_rows}")
                      # logger.warning('\n'.join(str(pa_table.slice(i, 1).to_pydict()) for i in range(pa_table.num_rows)))
                      yield f"{file_idx}_{batch_idx}", self._cast_table(
                          pa_table
                      )
              except ValueError as e:
                  logger.error(
                      f"Failed to read file '{file}' with error {type(e)}: {e}"
                  )
                  raise
  
file_path: datasets/src/datasets/packaged_modules/arrow/arrow.py
imports: import itertools
  from dataclasses import dataclass
  from typing import Optional
  import pyarrow
  import datasets
  from datasets.table import table_cast
label_desc: Use image node_id 4 for calling the Arrow obj's underlying member method code with example usage: obj._generate_tables(files) without return types