code: def test_declaration_to_reader(table_source):
      with table_source.to_reader() as reader:
          assert reader.schema == pa.schema(
              [("a", pa.int64()), ("b", pa.int64())]
          )
          result = reader.read_all()
      expected = pa.table({"a": [1, 2, 3], "b": [4, 5, 6]})
      assert result.equals(expected)
  
file_path: arrow/python/pyarrow/tests/test_acero.py
imports: import pytest
  import pyarrow
  import pyarrow.compute
  from pyarrow.compute import field
label_desc: Use image node_id 4 for calling a global function with example usage: test_declaration_to_reader(table_source) without return types