class_docstr: Prepares and uploads customer provided configs to S3
class_docstr_tok: ["Prepares","and","uploads","customer","provided","configs","to","S3"]
docstr: Prepares input channels for SageMaker Pipeline Step.
docstr_tok: ["Prepares","input","channels","for","SageMaker","Pipeline","Step","."]
code: def prepare_step_input_channel_for_spark_mode(
      self, func: Callable, s3_base_uri: str, sagemaker_session: Session
  ) -> Tuple[Dict, Dict]:
      """Prepares input channels for SageMaker Pipeline Step."""
      self._prepare_and_upload_callable(
          func, s3_base_uri, sagemaker_session
      )
      bootstrap_scripts_s3uri = (
          self._prepare_and_upload_runtime_scripts(
              self.remote_decorator_config.spark_config,
              s3_base_uri,
              self.remote_decorator_config.s3_kms_key,
              sagemaker_session,
          )
      )
      dependencies_list_path = self.runtime_env_manager.snapshot(
          self.remote_decorator_config.dependencies
      )
      user_workspace_s3uri = self._prepare_and_upload_workspace(
          dependencies_list_path,
          self.remote_decorator_config.include_local_workdir,
          self.remote_decorator_config.pre_execution_commands,
          self.remote_decorator_config.pre_execution_script,
          s3_base_uri,
          self.remote_decorator_config.s3_kms_key,
          sagemaker_session,
          self.remote_decorator_config.custom_file_filter,
      )
  
      (
          submit_jars_s3_paths,
          submit_py_files_s3_paths,
          submit_files_s3_path,
          config_file_s3_uri,
      ) = self._prepare_and_upload_spark_dependent_files(
          self.remote_decorator_config.spark_config,
          s3_base_uri,
          self.remote_decorator_config.s3_kms_key,
          sagemaker_session,
      )
  
      input_data_config = {
          RUNTIME_SCRIPTS_CHANNEL_NAME: TrainingInput(
              s3_data=bootstrap_scripts_s3uri,
              s3_data_type="S3Prefix",
              distribution=S3_DATA_DISTRIBUTION_TYPE,
          )
      }
      if user_workspace_s3uri:
          input_data_config[REMOTE_FUNCTION_WORKSPACE] = TrainingInput(
              s3_data=s3_path_join(
                  s3_base_uri, REMOTE_FUNCTION_WORKSPACE
              ),
              s3_data_type="S3Prefix",
              distribution=S3_DATA_DISTRIBUTION_TYPE,
          )
  
      if config_file_s3_uri:
          input_data_config[SPARK_CONF_CHANNEL_NAME] = TrainingInput(
              s3_data=config_file_s3_uri,
              s3_data_type="S3Prefix",
              distribution=S3_DATA_DISTRIBUTION_TYPE,
          )
  
      return input_data_config, {
          SPARK_JAR_FILES_PATH: submit_jars_s3_paths,
          SPARK_PY_FILES_PATH: submit_py_files_s3_paths,
          SPARK_FILES_PATH: submit_files_s3_path,
      }
  
file_path: sagemaker-python-sdk/src/sagemaker/feature_store/feature_processor/_config_uploader.py
imports: from __future__ import absolute_import
  from typing import Callable, Dict, Optional, Tuple, List, Union
  import attr
  from sagemaker import Session
  from sagemaker.feature_store.feature_processor._constants import SPARK_JAR_FILES_PATH, SPARK_PY_FILES_PATH, SPARK_FILES_PATH, S3_DATA_DISTRIBUTION_TYPE
  from sagemaker.inputs import TrainingInput
  from sagemaker.remote_function.core.stored_function import StoredFunction
  from sagemaker.remote_function.job import _prepare_and_upload_workspace, _prepare_and_upload_runtime_scripts, _JobSettings, RUNTIME_SCRIPTS_CHANNEL_NAME, REMOTE_FUNCTION_WORKSPACE, SPARK_CONF_CHANNEL_NAME, _prepare_and_upload_spark_dependent_files
  from sagemaker.remote_function.runtime_environment.runtime_environment_manager import RuntimeEnvironmentManager
  from sagemaker.remote_function.spark_config import SparkConfig
  from sagemaker.remote_function.custom_file_filter import CustomFileFilter
  from sagemaker.s3 import s3_path_join
label_desc: Use image node_id 1 for calling the ConfigUploader obj's underlying member method code with example usage: obj.prepare_step_input_channel_for_spark_mode(func, s3_base_uri, sagemaker_session) and returns: input_data_config,  dict