code: def test_run_serialized_query(tmpdir, use_threads):
      substrait_query = """
      {
          "version": { "major": 9999 },
          "relations": [
          {"rel": {
              "read": {
              "base_schema": {
                  "struct": {
                  "types": [
                              {"i64": {}}
                          ]
                  },
                  "names": [
                          "foo"
                          ]
              },
              "local_files": {
                  "items": [
                  {
                      "uri_file": "FILENAME_PLACEHOLDER",
                      "arrow": {}
                  }
                  ]
              }
              }
          }}
          ]
      }
      """
  
      file_name = "read_data.arrow"
      table = pa.table([[1, 2, 3, 4, 5]], names=["foo"])
      path = _write_dummy_data_to_disk(tmpdir, file_name, table)
      query = tobytes(
          substrait_query.replace(
              "FILENAME_PLACEHOLDER", pathlib.Path(path).as_uri()
          )
      )
  
      buf = pa._substrait._parse_json_plan(query)
  
      reader = substrait.run_query(buf, use_threads=use_threads)
      res_tb = reader.read_all()
  
      assert table.select(["foo"]) == res_tb.select(["foo"])
  
imports: import os
  import pathlib
  import pytest
  import pyarrow
  import pyarrow.compute
  from pyarrow.lib import tobytes
  from pyarrow.lib import ArrowInvalid, ArrowNotImplementedError
label_desc: Use image node_id 3 for calling a global function with example usage: test_run_serialized_query(tmpdir, use_threads) without return types