code: def test_declaration():
      table = pa.table({"a": [1, 2, 3], "b": [4, 5, 6]})
      table_opts = TableSourceNodeOptions(table)
      filter_opts = FilterNodeOptions(field("a") > 1)
  
      # using sequence
      decl = Declaration.from_sequence(
          [
              Declaration("table_source", options=table_opts),
              Declaration("filter", options=filter_opts),
          ]
      )
      result = decl.to_table()
      assert result.equals(table.slice(1, 2))
  
      # using explicit inputs
      table_source = Declaration("table_source", options=table_opts)
      filtered = Declaration(
          "filter", options=filter_opts, inputs=[table_source]
      )
      result = filtered.to_table()
      assert result.equals(table.slice(1, 2))
  
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 2 for calling a global function with example usage: test_declaration() without return types