code: def test_executor_submit(
      sagemaker_session,
      dummy_container_without_error,
      cpu_instance_type,
  ):
      def square(x):
          return x * x
  
      def cube(x):
          return x * x * x
  
      timestamp = int(time.time())
      job_prefix = f"test-submit-{timestamp}"
      with RemoteExecutor(
          max_parallel_jobs=1,
          role=ROLE,
          image_uri=dummy_container_without_error,
          instance_type=cpu_instance_type,
          sagemaker_session=sagemaker_session,
          keep_alive_period_in_seconds=30,
          job_name_prefix=job_prefix,
      ) as e:
          future_1 = e.submit(square, 10)
          future_2 = e.submit(cube, 10)
  
      assert future_1.result() == 100
      assert future_2.result() == 1000
  
      assert (
          get_future(future_1._job.job_name, sagemaker_session).result()
          == 100
      )
      assert (
          get_future(future_2._job.job_name, sagemaker_session).result()
          == 1000
      )
  
      assert next(
          list_futures(
              job_name_prefix=job_prefix,
              sagemaker_session=sagemaker_session,
          )
      )._job.job_name.startswith(job_prefix)
  
file_path: sagemaker-python-sdk/tests/integ/sagemaker/remote_function/test_executor.py
imports: from __future__ import absolute_import
  import time
  import pytest
  from sagemaker.experiments.trial_component import _TrialComponent
  from sagemaker.remote_function import RemoteExecutor
  from sagemaker.remote_function.client import get_future, list_futures
  from sagemaker.experiments.run import Run, load_run
  from sagemaker.remote_function.core.serialization import CloudpickleSerializer
  from sagemaker.remote_function.errors import DeserializationError
  from sagemaker.s3 import S3Uploader
  from sagemaker.s3_utils import s3_path_join
  from tests.integ.sagemaker.experiments.helpers import cleanup_exp_resources
  from sagemaker.utils import unique_name_from_base
label_desc: Use image node_id 1 for calling a global function with example usage: test_executor_submit(sagemaker_session, dummy_container_without_error, cpu_instance_type) and returns: unknown, unknown