code: def test_set_environment(self):
      python_exec_link_path = sys.executable
      self.t_env.get_config().set_python_executable(
          python_exec_link_path
      )
  
      def check_python_exec(i):
          import os
  
          assert os.environ["python"] == python_exec_link_path
          return i
  
      self.t_env.create_temporary_system_function(
          "check_python_exec",
          udf(
              check_python_exec, DataTypes.BIGINT(), DataTypes.BIGINT()
          ),
      )
  
      def check_pyflink_gateway_disabled(i):
          from pyflink.java_gateway import get_gateway
  
          get_gateway()
          return i
  
      self.t_env.create_temporary_system_function(
          "check_pyflink_gateway_disabled",
          udf(
              check_pyflink_gateway_disabled,
              DataTypes.BIGINT(),
              DataTypes.BIGINT(),
          ),
      )
  
      sink_table_ddl = """
          CREATE TABLE Results(a BIGINT, b BIGINT) WITH ('connector'='test-sink')
          """
      self.t_env.execute_sql(sink_table_ddl)
      t = self.t_env.from_elements([(1, 2), (2, 5), (3, 1)], ["a", "b"])
      t.select(
          expr.call("check_python_exec", t.a),
          expr.call("check_pyflink_gateway_disabled", t.a),
      ).execute_insert("Results").wait()
  
      actual = source_sink_utils.results()
      self.assert_equals(actual, ["+I[1, 1]", "+I[2, 2]", "+I[3, 3]"])
  
imports: import os
  import shutil
  import sys
  import unittest
  import uuid
  from pyflink.table import DataTypes, TableEnvironment, EnvironmentSettings
  from pyflink.table import expressions
  from pyflink.table.udf import udf
  from pyflink.testing import source_sink_utils
  from pyflink.testing.test_case_utils import PyFlinkTestCase
label_desc: Use image node_id 4 for calling the StreamDependencyTests obj's underlying member method code with example usage: obj.test_set_environment() and returns: i, i