code: def test_custom_error_split_method(
      tmp_recipe_root_path: Path, tmp_recipe_exec_path: Path
  ):
      ingest_output_dir = (
          tmp_recipe_exec_path / "steps" / "ingest" / "outputs"
      )
      ingest_output_dir.mkdir(parents=True)
      split_output_dir = (
          tmp_recipe_exec_path / "steps" / "split" / "outputs"
      )
      split_output_dir.mkdir(parents=True)
      recipe_steps_dir = tmp_recipe_root_path.joinpath("steps")
      recipe_steps_dir.mkdir(parents=True)
  
      num_rows = 1000
      input_dataframe = pd.DataFrame(
          {
              "a": list(range(num_rows)),
              "y": [float(i % 2) for i in range(num_rows)],
          }
      )
      input_dataframe.to_parquet(
          str(ingest_output_dir / "dataset.parquet")
      )
  
      recipe_yaml = tmp_recipe_root_path.joinpath(
          _RECIPE_CONFIG_FILE_NAME
      )
      recipe_yaml.write_text(
          f"""
          recipe: "regression/v1"
          target_col: "y"
          primary_metric: "f1_score"
          profile: "test_profile"
          run_args:
              step: "split"
          experiment:
              name: "demo"
              tracking_uri: {mlflow.get_tracking_uri()}
          steps:
              split:
                  using: custom
                  split_method: split_method
          """
      )
  
      m_split = Mock()
      m_split.split_method = custom_error_split
  
      recipe_config = read_yaml(
          tmp_recipe_root_path, _RECIPE_CONFIG_FILE_NAME
      )
      split_step = SplitStep.from_recipe_config(
          recipe_config, str(tmp_recipe_root_path)
      )
      with mock.patch.dict(
          "sys.modules", {"steps.split": m_split}
      ), pytest.raises(
          MlflowException,
          match=r"Value returned back: \['VALIDATE' 'TESTING'\]",
      ):
          split_step.run(str(split_output_dir))
  
imports: from pathlib import Path
  from unittest import mock
  from unittest.mock import Mock
  import numpy
  import pandas
  import pytest
  import mlflow
  from mlflow.environment_variables import MLFLOW_RECIPES_EXECUTION_DIRECTORY
  from mlflow.exceptions import MlflowException
  from mlflow.recipes.steps.split import _OUTPUT_TEST_FILE_NAME, _OUTPUT_TRAIN_FILE_NAME, _OUTPUT_VALIDATION_FILE_NAME, SplitStep, SplitValues, _get_split_df, _hash_pandas_dataframe, _make_elem_hashable, _validate_user_code_output
  from mlflow.recipes.utils import _RECIPE_CONFIG_FILE_NAME
  from mlflow.utils.file_utils import read_yaml
label_desc: Use image node_id 14 for calling a global function with example usage: test_custom_error_split_method(tmp_recipe_root_path, tmp_recipe_exec_path) without return types