code: def test_run_query_input_types(tmpdir, query):
      # Passing unsupported type, like int, will not segfault.
      if not isinstance(query, (pa.Buffer, bytes)):
          msg = (
              f"Expected 'pyarrow.Buffer' or bytes, got '{type(query)}'"
          )
          with pytest.raises(TypeError, match=msg):
              substrait.run_query(query)
          return
  
      # Otherwise error for invalid query
      msg = "ParseFromZeroCopyStream failed for substrait.Plan"
      with pytest.raises(OSError, match=msg):
          substrait.run_query(query)
  
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 4 for calling a global function with example usage: test_run_query_input_types(tmpdir, query) without return types