code: def test_to_pipeline_wrong_mode(
      get_execution_role, mock_spark_image, session
  ):
      spark_config = SparkConfig(
          submit_files=["file_a", "file_b", "file_c"]
      )
      job_settings = _JobSettings(
          spark_config=spark_config,
          s3_root_uri=S3_URI,
          role=EXECUTION_ROLE_ARN,
          include_local_workdir=True,
          instance_type="ml.m5.large",
          encrypt_inter_container_traffic=True,
      )
      jobs_container_entrypoint = [
          "/bin/bash",
          f"/opt/ml/input/data/{RUNTIME_SCRIPTS_CHANNEL_NAME}/{ENTRYPOINT_SCRIPT_NAME}",
      ]
      jobs_container_entrypoint.extend(["--jars", "path_a"])
      jobs_container_entrypoint.extend(["--py-files", "path_b"])
      jobs_container_entrypoint.extend(["--files", "path_c"])
      jobs_container_entrypoint.extend([SPARK_APP_SCRIPT_PATH])
      container_args = ["--s3_base_uri", f"{S3_URI}/pipeline_name"]
      container_args.extend(["--region", TEST_REGION])
  
      mock_feature_processor_config = Mock(
          mode=FeatureProcessorMode.PYTHON
      )
      mock_feature_processor_config.mode.return_value = (
          FeatureProcessorMode.PYTHON
      )
  
      wrapped_func = Mock(
          Callable,
          feature_processor_config=mock_feature_processor_config,
          job_settings=job_settings,
          wrapped_func=job_function,
      )
      wrapped_func.feature_processor_config.return_value = (
          mock_feature_processor_config
      )
      wrapped_func.job_settings.return_value = job_settings
      wrapped_func.wrapped_func.return_value = job_function
  
      with pytest.raises(
          ValueError,
          match="Mode FeatureProcessorMode.PYTHON is not supported by to_pipeline API.",
      ):
          to_pipeline(
              pipeline_name="pipeline_name",
              step=wrapped_func,
              role=EXECUTION_ROLE_ARN,
              max_retries=1,
          )
  
imports: from __future__ import absolute_import
  from datetime import datetime
  from typing import Callable
  import pytest
  import json
  from botocore.exceptions import ClientError
  from mock import Mock, patch, call
  from sagemaker.feature_store.feature_processor.feature_scheduler import FeatureProcessorLineageHandler
  from sagemaker.feature_store.feature_processor import FeatureProcessorPipelineEvents, FeatureProcessorPipelineExecutionStatus
  from sagemaker.lineage.context import Context
  from sagemaker.remote_function.spark_config import SparkConfig
  from sagemaker import Session
  from sagemaker.feature_store.feature_processor._enums import FeatureProcessorMode
  from sagemaker.feature_store.feature_processor._constants import FEATURE_PROCESSOR_TAG_KEY, FEATURE_PROCESSOR_TAG_VALUE, EXECUTION_TIME_PIPELINE_PARAMETER_FORMAT, PIPELINE_NAME_MAXIMUM_LENGTH
  from sagemaker.feature_store.feature_processor.feature_scheduler import schedule, to_pipeline, execute, delete_schedule, describe, list_pipelines, put_trigger, enable_trigger, disable_trigger, delete_trigger, _validate_fg_lineage_resources, _validate_pipeline_lineage_resources
  from sagemaker.remote_function.job import _JobSettings, SPARK_APP_SCRIPT_PATH, RUNTIME_SCRIPTS_CHANNEL_NAME, REMOTE_FUNCTION_WORKSPACE, ENTRYPOINT_SCRIPT_NAME, SPARK_CONF_CHANNEL_NAME
  from sagemaker.workflow.parameters import Parameter, ParameterTypeEnum
  from sagemaker.workflow.retry import StepRetryPolicy, StepExceptionTypeEnum, SageMakerJobStepRetryPolicy, SageMakerJobExceptionTypeEnum
  import test_data_helpers
label_desc: Use image node_id 11 for calling a global function with example usage: test_to_pipeline_wrong_mode(get_execution_role, mock_spark_image, session) without return types