code: def test_filter_table():
      t = pa.table({"a": [1, 2, 3, 4, 5], "b": [10, 20, 30, 40, 50]})
  
      result = _filter_table(
          t,
          (pc.field("a") <= pc.scalar(3))
          & (pc.field("b") == pc.scalar(20)),
      )
      assert result == pa.table({"a": [2], "b": [20]})
  
      result = _filter_table(t, pc.field("b") > pc.scalar(30))
      assert result == pa.table({"a": [4, 5], "b": [40, 50]})
  
file_path: arrow/python/pyarrow/tests/test_exec_plan.py
imports: import pytest
  import pyarrow
  import pyarrow.compute
  from .test_extension_type import IntegerType
label_desc: Use image node_id 6 for calling a global function with example usage: test_filter_table() without return types