code: def _generate_input_data_config(
      job_settings: _JobSettings, s3_base_uri: str
  ):
      """Generates input data config"""
      from sagemaker.workflow.utilities import (
          load_step_compilation_context,
      )
  
      step_compilation_context = load_step_compilation_context()
  
      bootstrap_scripts_s3uri = _prepare_and_upload_runtime_scripts(
          spark_config=job_settings.spark_config,
          s3_base_uri=s3_base_uri,
          s3_kms_key=job_settings.s3_kms_key,
          sagemaker_session=job_settings.sagemaker_session,
      )
  
      input_data_config = [
          dict(
              ChannelName=RUNTIME_SCRIPTS_CHANNEL_NAME,
              DataSource={
                  "S3DataSource": {
                      "S3Uri": bootstrap_scripts_s3uri,
                      "S3DataType": "S3Prefix",
                  }
              },
          )
      ]
  
      local_dependencies_path = RuntimeEnvironmentManager().snapshot(
          job_settings.dependencies
      )
  
      if step_compilation_context:
          with _tmpdir() as tmp_dir:
              script_and_dependencies_s3uri = _prepare_dependencies_and_pre_execution_scripts(
                  local_dependencies_path=local_dependencies_path,
                  pre_execution_commands=job_settings.pre_execution_commands,
                  pre_execution_script_local_path=job_settings.pre_execution_script,
                  s3_base_uri=s3_base_uri,
                  s3_kms_key=job_settings.s3_kms_key,
                  sagemaker_session=job_settings.sagemaker_session,
                  tmp_dir=tmp_dir,
              )
  
              if script_and_dependencies_s3uri:
                  input_data_config.append(
                      dict(
                          ChannelName=SCRIPT_AND_DEPENDENCIES_CHANNEL_NAME,
                          DataSource={
                              "S3DataSource": {
                                  "S3Uri": script_and_dependencies_s3uri,
                                  "S3DataType": "S3Prefix",
                              }
                          },
                      )
                  )
  
      user_workspace_s3uri = _prepare_and_upload_workspace(
          local_dependencies_path=local_dependencies_path,
          include_local_workdir=job_settings.include_local_workdir,
          pre_execution_commands=job_settings.pre_execution_commands,
          pre_execution_script_local_path=job_settings.pre_execution_script,
          s3_base_uri=s3_base_uri,
          s3_kms_key=job_settings.s3_kms_key,
          sagemaker_session=job_settings.sagemaker_session,
          custom_file_filter=job_settings.custom_file_filter,
      )
  
      if user_workspace_s3uri:
          input_data_config.append(
              dict(
                  ChannelName=REMOTE_FUNCTION_WORKSPACE
                  if not step_compilation_context
                  else step_compilation_context.pipeline_build_time,
                  DataSource={
                      "S3DataSource": {
                          "S3Uri": user_workspace_s3uri,
                          "S3DataType": "S3Prefix",
                      }
                  },
              )
          )
  
      return input_data_config
  
imports: from __future__ import absolute_import
  import dataclasses
  import os
  import re
  import shutil
  import sys
  import json
  import secrets
  from typing import Callable, Dict, List, Optional, Tuple, Union, TYPE_CHECKING
  from urllib.parse import urlparse
  from io import BytesIO
  from sagemaker.config.config_schema import REMOTE_FUNCTION_ENVIRONMENT_VARIABLES, REMOTE_FUNCTION_IMAGE_URI, REMOTE_FUNCTION_DEPENDENCIES, REMOTE_FUNCTION_PRE_EXECUTION_COMMANDS, REMOTE_FUNCTION_PRE_EXECUTION_SCRIPT, REMOTE_FUNCTION_INCLUDE_LOCAL_WORKDIR, REMOTE_FUNCTION_INSTANCE_TYPE, REMOTE_FUNCTION_JOB_CONDA_ENV, REMOTE_FUNCTION_ROLE_ARN, REMOTE_FUNCTION_S3_ROOT_URI, REMOTE_FUNCTION_S3_KMS_KEY_ID, REMOTE_FUNCTION_VOLUME_KMS_KEY_ID, REMOTE_FUNCTION_TAGS, REMOTE_FUNCTION_VPC_CONFIG_SUBNETS, REMOTE_FUNCTION_VPC_CONFIG_SECURITY_GROUP_IDS, REMOTE_FUNCTION_ENABLE_INTER_CONTAINER_TRAFFIC_ENCRYPTION
  from sagemaker.experiments._run_context import _RunContext
  from sagemaker.experiments.run import Run
  from sagemaker.image_uris import get_base_python_image_uri
  from sagemaker import image_uris
  from sagemaker.remote_function.checkpoint_location import CheckpointLocation
  from sagemaker.session import get_execution_role, _logs_for_job, Session
  from sagemaker.utils import name_from_base, _tmpdir, resolve_value_from_config, format_tags, Tags
  from sagemaker.s3 import s3_path_join, S3Uploader
  from sagemaker import vpc_utils
  from sagemaker.remote_function.core.stored_function import StoredFunction, _SerializedData
  from sagemaker.remote_function.core.pipeline_variables import Context
  from sagemaker.remote_function.runtime_environment.runtime_environment_manager import RuntimeEnvironmentManager, _DependencySettings
  from sagemaker.remote_function import logging_config
  from sagemaker.remote_function.spark_config import SparkConfig
  from sagemaker.spark import defaults
  from sagemaker.remote_function.custom_file_filter import CustomFileFilter, copy_workdir, resolve_custom_file_filter_from_config_file
label_desc: Use image node_id 2 for calling a global function with example usage: _generate_input_data_config(job_settings, s3_base_uri) and returns: input_data_config