code: def test_table_source():
      with pytest.raises(TypeError):
          TableSourceNodeOptions(
              pa.record_batch([pa.array([1, 2, 3])], ["a"])
          )
  
      table_source = TableSourceNodeOptions(None)
      decl = Declaration("table_source", table_source)
      with pytest.raises(
          ValueError,
          match="TableSourceNode requires table which is not null",
      ):
          _ = decl.to_table()
  
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 5 for calling a global function with example usage: test_table_source() without return types