code: def test_table_function_with_sql_query(self):
      self.t_env.execute_sql(
          """
              CREATE TABLE Results_test_table_function_with_sql_query(
                  a BIGINT,
                  b BIGINT,
                  c BIGINT
              ) WITH ('connector'='test-sink')"""
      )
  
      self.t_env.create_temporary_system_function(
          "multi_emit",
          udtf(
              MultiEmit(),
              result_types=[DataTypes.BIGINT(), DataTypes.BIGINT()],
          ),
      )
  
      t = self.t_env.from_elements(
          [(1, 1, 3), (2, 1, 6), (3, 2, 9)], ["a", "b", "c"]
      )
      self.t_env.create_temporary_view("MyTable", t)
      t = self.t_env.sql_query(
          "SELECT a, x, y FROM MyTable LEFT JOIN LATERAL TABLE(multi_emit(a, b)) as T(x, y)"
          " ON TRUE"
      )
      t.execute_insert(
          "Results_test_table_function_with_sql_query"
      ).wait()
      actual = source_sink_utils.results()
      self.assert_equals(
          actual,
          ["+I[1, 1, 0]", "+I[2, 2, 0]", "+I[3, 3, 0]", "+I[3, 3, 1]"],
      )
  
imports: import unittest
  from pyflink.table import DataTypes
  from pyflink.table.udf import TableFunction, udtf, ScalarFunction, udf
  from pyflink.table.expressions import col
  from pyflink.testing import source_sink_utils
  from pyflink.testing.test_case_utils import PyFlinkStreamTableTestCase, PyFlinkBatchTableTestCase
label_desc: Use image node_id 2 for calling the UserDefinedTableFunctionTests obj's underlying member method code with example usage: obj.test_table_function_with_sql_query() without return types