code: def test_add_python_file_2(self):
      import uuid
  
      env = self.env
      python_file_dir = os.path.join(
          self.tempdir, "python_file_dir_" + str(uuid.uuid4())
      )
      os.mkdir(python_file_dir)
      python_file_path = os.path.join(python_file_dir, "test_dep1.py")
      with open(python_file_path, "w") as f:
          f.write("def add_two(a):\n    return a + 2")
  
      def plus_two_map(value):
          from test_dep1 import add_two
  
          return add_two(value)
  
      get_j_env_configuration(
          env._j_stream_execution_environment
      ).setString("taskmanager.numberOfTaskSlots", "10")
      env.add_python_file(python_file_path)
      ds = env.from_collection([1, 2, 3, 4, 5])
      ds = (
          ds.map(plus_two_map, Types.LONG())
          .slot_sharing_group("data_stream")
          .map(lambda i: i, Types.LONG())
          .slot_sharing_group("table")
      )
  
      python_file_path = os.path.join(python_file_dir, "test_dep2.py")
      with open(python_file_path, "w") as f:
          f.write("def add_three(a):\n    return a + 3")
  
      def plus_three(value):
          from test_dep2 import add_three
  
          return add_three(value)
  
      env.add_python_file(python_file_path)
      t_env = StreamTableEnvironment.create(
          stream_execution_environment=env,
          environment_settings=EnvironmentSettings.in_streaming_mode(),
      )
  
      from pyflink.table.udf import udf
      from pyflink.table.expressions import col
  
      add_three = udf(plus_three, result_type=DataTypes.BIGINT())
  
      tab = t_env.from_data_stream(ds, col("a")).select(
          add_three(col("a"))
      )
      result = [i[0] for i in tab.execute().collect()]
      expected = [6, 7, 8, 9, 10]
      result.sort()
      expected.sort()
      self.assertEqual(expected, result)
  
imports: import datetime
  import decimal
  import glob
  import os
  import shutil
  import tempfile
  import time
  import uuid
  from pyflink.common import Configuration, ExecutionConfig, RestartStrategies
  from pyflink.common.typeinfo import Types
  from pyflink.datastream import StreamExecutionEnvironment, CheckpointConfig, CheckpointingMode, MemoryStateBackend, TimeCharacteristic, SlotSharingGroup
  from pyflink.datastream.connectors.kafka import FlinkKafkaConsumer
  from pyflink.datastream.execution_mode import RuntimeExecutionMode
  from pyflink.datastream.formats.json import JsonRowDeserializationSchema
  from pyflink.datastream.functions import SourceFunction
  from pyflink.datastream.slot_sharing_group import MemorySize
  from pyflink.datastream.tests.test_util import DataStreamTestSinkFunction
  from pyflink.find_flink_home import _find_flink_source_root
  from pyflink.java_gateway import get_gateway
  from pyflink.table import DataTypes, StreamTableEnvironment, EnvironmentSettings
  from pyflink.testing.test_case_utils import PyFlinkTestCase, exec_insert_table
  from pyflink.util.java_utils import get_j_env_configuration
label_desc: Use image node_id 29 for calling the StreamExecutionEnvironmentTests obj's underlying member method code with example usage: obj.test_add_python_file_2() and returns: add_two, add_three