code: def get_init_kwargs(
      model_id: str,
      model_version: Optional[str] = None,
      tolerate_vulnerable_model: Optional[bool] = None,
      tolerate_deprecated_model: Optional[bool] = None,
      region: Optional[str] = None,
      image_uri: Optional[Union[str, PipelineVariable]] = None,
      role: Optional[str] = None,
      instance_count: Optional[Union[int, PipelineVariable]] = None,
      instance_type: Optional[Union[str, PipelineVariable]] = None,
      keep_alive_period_in_seconds: Optional[
          Union[int, PipelineVariable]
      ] = None,
      volume_size: Optional[Union[int, PipelineVariable]] = None,
      volume_kms_key: Optional[Union[str, PipelineVariable]] = None,
      max_run: Optional[Union[int, PipelineVariable]] = None,
      input_mode: Optional[Union[str, PipelineVariable]] = None,
      output_path: Optional[Union[str, PipelineVariable]] = None,
      output_kms_key: Optional[Union[str, PipelineVariable]] = None,
      base_job_name: Optional[str] = None,
      sagemaker_session: Optional[Session] = None,
      hyperparameters: Optional[
          Dict[str, Union[str, PipelineVariable]]
      ] = None,
      tags: Optional[Tags] = None,
      subnets: Optional[List[Union[str, PipelineVariable]]] = None,
      security_group_ids: Optional[
          List[Union[str, PipelineVariable]]
      ] = None,
      model_uri: Optional[str] = None,
      model_channel_name: Optional[Union[str, PipelineVariable]] = None,
      metric_definitions: Optional[
          List[Dict[str, Union[str, PipelineVariable]]]
      ] = None,
      encrypt_inter_container_traffic: Union[
          bool, PipelineVariable
      ] = None,
      use_spot_instances: Optional[
          Union[bool, PipelineVariable]
      ] = None,
      max_wait: Optional[Union[int, PipelineVariable]] = None,
      checkpoint_s3_uri: Optional[Union[str, PipelineVariable]] = None,
      checkpoint_local_path: Optional[
          Union[str, PipelineVariable]
      ] = None,
      enable_network_isolation: Union[bool, PipelineVariable] = None,
      rules: Optional[List[RuleBase]] = None,
      debugger_hook_config: Optional[
          Union[DebuggerHookConfig, bool]
      ] = None,
      tensorboard_output_config: Optional[
          TensorBoardOutputConfig
      ] = None,
      enable_sagemaker_metrics: Optional[
          Union[bool, PipelineVariable]
      ] = None,
      profiler_config: Optional[ProfilerConfig] = None,
      disable_profiler: Optional[bool] = None,
      environment: Optional[
          Dict[str, Union[str, PipelineVariable]]
      ] = None,
      max_retry_attempts: Optional[Union[int, PipelineVariable]] = None,
      source_dir: Optional[Union[str, PipelineVariable]] = None,
      git_config: Optional[Dict[str, str]] = None,
      container_log_level: Optional[
          Union[int, PipelineVariable]
      ] = None,
      code_location: Optional[str] = None,
      entry_point: Optional[Union[str, PipelineVariable]] = None,
      dependencies: Optional[List[str]] = None,
      instance_groups: Optional[List[InstanceGroup]] = None,
      training_repository_access_mode: Optional[
          Union[str, PipelineVariable]
      ] = None,
      training_repository_credentials_provider_arn: Optional[
          Union[str, PipelineVariable]
      ] = None,
      container_entry_point: Optional[List[str]] = None,
      container_arguments: Optional[List[str]] = None,
      disable_output_compression: Optional[bool] = None,
      enable_infra_check: Optional[
          Union[bool, PipelineVariable]
      ] = None,
      enable_remote_debug: Optional[
          Union[bool, PipelineVariable]
      ] = None,
  ) -> JumpStartEstimatorInitKwargs:
      """Returns kwargs required to instantiate `sagemaker.estimator.Estimator` object."""
  
      estimator_init_kwargs: JumpStartEstimatorInitKwargs = JumpStartEstimatorInitKwargs(
          model_id=model_id,
          model_version=model_version,
          role=role,
          region=region,
          instance_count=instance_count,
          instance_type=instance_type,
          tolerate_deprecated_model=tolerate_deprecated_model,
          tolerate_vulnerable_model=tolerate_vulnerable_model,
          keep_alive_period_in_seconds=keep_alive_period_in_seconds,
          volume_size=volume_size,
          volume_kms_key=volume_kms_key,
          max_run=max_run,
          input_mode=input_mode,
          output_path=output_path,
          output_kms_key=output_kms_key,
          base_job_name=base_job_name,
          sagemaker_session=sagemaker_session,
          tags=format_tags(tags),
          subnets=subnets,
          security_group_ids=security_group_ids,
          model_uri=model_uri,
          model_channel_name=model_channel_name,
          metric_definitions=metric_definitions,
          encrypt_inter_container_traffic=encrypt_inter_container_traffic,
          use_spot_instances=use_spot_instances,
          max_wait=max_wait,
          checkpoint_s3_uri=checkpoint_s3_uri,
          checkpoint_local_path=checkpoint_local_path,
          rules=rules,
          debugger_hook_config=debugger_hook_config,
          tensorboard_output_config=tensorboard_output_config,
          enable_sagemaker_metrics=enable_sagemaker_metrics,
          enable_network_isolation=enable_network_isolation,
          profiler_config=profiler_config,
          disable_profiler=disable_profiler,
          environment=environment,
          max_retry_attempts=max_retry_attempts,
          source_dir=source_dir,
          git_config=git_config,
          hyperparameters=hyperparameters,
          container_log_level=container_log_level,
          code_location=code_location,
          entry_point=entry_point,
          dependencies=dependencies,
          instance_groups=instance_groups,
          training_repository_access_mode=training_repository_access_mode,
          training_repository_credentials_provider_arn=training_repository_credentials_provider_arn,
          image_uri=image_uri,
          container_entry_point=container_entry_point,
          container_arguments=container_arguments,
          disable_output_compression=disable_output_compression,
          enable_infra_check=enable_infra_check,
          enable_remote_debug=enable_remote_debug,
      )
  
      estimator_init_kwargs = _add_model_version_to_kwargs(
          estimator_init_kwargs
      )
      estimator_init_kwargs = (
          _add_vulnerable_and_deprecated_status_to_kwargs(
              estimator_init_kwargs
          )
      )
      estimator_init_kwargs = _add_region_to_kwargs(
          estimator_init_kwargs
      )
      estimator_init_kwargs = _add_sagemaker_session_to_kwargs(
          estimator_init_kwargs
      )
      estimator_init_kwargs = _add_instance_type_and_count_to_kwargs(
          estimator_init_kwargs
      )
      estimator_init_kwargs = _add_image_uri_to_kwargs(
          estimator_init_kwargs
      )
      estimator_init_kwargs = _add_model_uri_to_kwargs(
          estimator_init_kwargs
      )
      estimator_init_kwargs = _add_source_dir_to_kwargs(
          estimator_init_kwargs
      )
      estimator_init_kwargs = _add_entry_point_to_kwargs(
          estimator_init_kwargs
      )
      estimator_init_kwargs = _add_hyperparameters_to_kwargs(
          estimator_init_kwargs
      )
      estimator_init_kwargs = _add_metric_definitions_to_kwargs(
          estimator_init_kwargs
      )
      estimator_init_kwargs = _add_estimator_extra_kwargs(
          estimator_init_kwargs
      )
      estimator_init_kwargs = _add_role_to_kwargs(estimator_init_kwargs)
      estimator_init_kwargs = _add_env_to_kwargs(estimator_init_kwargs)
      estimator_init_kwargs = _add_tags_to_kwargs(estimator_init_kwargs)
  
      return estimator_init_kwargs
  
imports: from __future__ import absolute_import
  from typing import Dict, List, Optional, Union
  from sagemaker import environment_variables, hyperparameters, image_uris, instance_types, metric_definitions, model_uris, script_uris
  from sagemaker.jumpstart.artifacts import _model_supports_incremental_training, _retrieve_model_package_model_artifact_s3_uri
  from sagemaker.jumpstart.artifacts.resource_names import _retrieve_resource_name_base
  from sagemaker.session import Session
  from sagemaker.async_inference.async_inference_config import AsyncInferenceConfig
  from sagemaker.base_deserializers import BaseDeserializer
  from sagemaker.base_serializers import BaseSerializer
  from sagemaker.debugger.debugger import DebuggerHookConfig, RuleBase, TensorBoardOutputConfig
  from sagemaker.debugger.profiler_config import ProfilerConfig
  from sagemaker.explainer.explainer_config import ExplainerConfig
  from sagemaker.inputs import FileSystemInput, TrainingInput
  from sagemaker.instance_group import InstanceGroup
  from sagemaker.jumpstart.artifacts import _retrieve_estimator_init_kwargs, _retrieve_estimator_fit_kwargs, _model_supports_training_model_uri
  from sagemaker.jumpstart.constants import DEFAULT_JUMPSTART_SAGEMAKER_SESSION, JUMPSTART_DEFAULT_REGION_NAME, JUMPSTART_LOGGER, TRAINING_ENTRY_POINT_SCRIPT_NAME, SAGEMAKER_GATED_MODEL_S3_URI_TRAINING_ENV_VAR_KEY
  from sagemaker.jumpstart.enums import JumpStartScriptScope
  from sagemaker.jumpstart.factory import model
  from sagemaker.jumpstart.types import JumpStartEstimatorDeployKwargs, JumpStartEstimatorFitKwargs, JumpStartEstimatorInitKwargs, JumpStartKwargs, JumpStartModelDeployKwargs, JumpStartModelInitKwargs
  from sagemaker.jumpstart.utils import add_jumpstart_model_id_version_tags, update_dict_if_key_not_present, resolve_estimator_sagemaker_config_field, verify_model_region_and_return_specs
  from sagemaker.model_monitor.data_capture_config import DataCaptureConfig
  from sagemaker.serverless.serverless_inference_config import ServerlessInferenceConfig
  from sagemaker.utils import name_from_base, format_tags, Tags
  from sagemaker.workflow.entities import PipelineVariable
label_desc: Use image node_id 1 for calling a global function with example usage: get_init_kwargs(model_id, model_version, tolerate_vulnerable_model, tolerate_deprecated_model, region, image_uri, role, instance_count, instance_type, keep_alive_period_in_seconds, volume_size, volume_kms_key, max_run, input_mode, output_path, output_kms_key, base_job_name, sagemaker_session, hyperparameters, tags, subnets, security_group_ids, model_uri, model_channel_name, metric_definitions, encrypt_inter_container_traffic, use_spot_instances, max_wait, checkpoint_s3_uri, checkpoint_local_path, enable_network_isolation, rules, debugger_hook_config, tensorboard_output_config, enable_sagemaker_metrics, profiler_config, disable_profiler, environment, max_retry_attempts, source_dir, git_config, container_log_level, code_location, entry_point, dependencies, instance_groups, training_repository_access_mode, training_repository_credentials_provider_arn, container_entry_point, container_arguments, disable_output_compression, enable_infra_check, enable_remote_debug) and returns: estimator_init_kwargs