code: def test_filter(table_source):
      # referencing unknown field
      decl = Declaration.from_sequence(
          [
              table_source,
              Declaration(
                  "filter", options=FilterNodeOptions(field("c") > 1)
              ),
          ]
      )
      with pytest.raises(
          ValueError, match=r"No match for FieldRef.Name\(c\)"
      ):
          _ = decl.to_table()
  
      # requires a pyarrow Expression
      with pytest.raises(TypeError):
          FilterNodeOptions(pa.array([True, False, True]))
      with pytest.raises(TypeError):
          FilterNodeOptions(None)
  
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 6 for calling a global function with example usage: test_filter(table_source) without return types