code: def test_named_table_invalid_table_name():
      test_table_1 = pa.Table.from_pydict({"x": [1, 2, 3]})
  
      def table_provider(names, _):
          if not names:
              raise Exception("No names provided")
          elif names[0] == "t1":
              return test_table_1
          else:
              raise Exception("Unrecognized table name")
  
      substrait_query = """
      {
          "version": { "major": 9999 },
          "relations": [
          {"rel": {
              "read": {
              "base_schema": {
                  "struct": {
                  "types": [
                              {"i64": {}}
                          ]
                  },
                  "names": [
                          "x"
                          ]
              },
              "namedTable": {
                      "names": ["t3"]
              }
              }
          }}
          ]
      }
      """
  
      buf = pa._substrait._parse_json_plan(tobytes(substrait_query))
      exec_message = "Invalid NamedTable Source"
      with pytest.raises(ArrowInvalid, match=exec_message):
          substrait.run_query(buf, table_provider=table_provider)
  
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 10 for calling a global function with example usage: test_named_table_invalid_table_name() and returns: test_table_1