code: def test_filter_table_ordering():
      table1 = pa.table({"a": [1, 2, 3, 4], "b": ["a"] * 4})
      table2 = pa.table({"a": [1, 2, 3, 4], "b": ["b"] * 4})
      table = pa.concat_tables([table1, table2])
  
      for _ in range(20):
          # 20 seems to consistently cause errors when order is not preserved.
          # If the order problem is reintroduced this test will become flaky
          # which is still a signal that the order is not preserved.
          r = _filter_table(table, pc.field("a") == 1)
          assert r["b"] == pa.chunked_array([["a"], ["b"]])
  
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 7 for calling a global function with example usage: test_filter_table_ordering() without return types