code: def test_invalid_plan():
      query = """
      {
          "relations": [
          ]
      }
      """
      buf = pa._substrait._parse_json_plan(tobytes(query))
      exec_message = "Plan has no relations"
      with pytest.raises(ArrowInvalid, match=exec_message):
          substrait.run_query(buf)
  
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 5 for calling a global function with example usage: test_invalid_plan() without return types