code: def set_up_transform_step(recipe_root: Path, transform_user_module):
      split_step_output_dir = recipe_root.joinpath(
          "steps", "split", "outputs"
      )
      split_step_output_dir.mkdir(parents=True)
  
      transform_step_output_dir = recipe_root.joinpath(
          "steps", "transform", "outputs"
      )
      transform_step_output_dir.mkdir(parents=True)
  
      # use for train and validation, also for split
      dataset = pd.DataFrame(
          {
              "a": list(range(0, 5)),
              "b": list(range(5, 10)),
              "y": [float(i % 2) for i in range(5)],
          }
      )
      dataset.to_parquet(
          str(split_step_output_dir / "validation.parquet")
      )
      dataset.to_parquet(str(split_step_output_dir / "train.parquet"))
  
      recipe_yaml = recipe_root.joinpath(_RECIPE_CONFIG_FILE_NAME)
      experiment_name = "demo"
      MlflowClient().create_experiment(experiment_name)
  
      recipe_yaml.write_text(
          f"""
          recipe: "regression/v1"
          target_col: "y"
          experiment:
            name: {experiment_name}
            tracking_uri: {mlflow.get_tracking_uri()}
          steps:
            transform:
              using: custom
              transformer_method: {transform_user_module}
          """
      )
      recipe_config = read_yaml(recipe_root, _RECIPE_CONFIG_FILE_NAME)
      transform_step = TransformStep.from_recipe_config(
          recipe_config, str(recipe_root)
      )
      return (
          transform_step,
          transform_step_output_dir,
          split_step_output_dir,
      )
  
file_path: mlflow/tests/recipes/test_transform_step.py
imports: import os
  from pathlib import Path
  from unittest import mock
  import pandas
  import pytest
  import mlflow
  from mlflow import MlflowClient
  from mlflow.environment_variables import MLFLOW_RECIPES_EXECUTION_DIRECTORY
  from mlflow.exceptions import MlflowException
  from mlflow.recipes.steps.transform import TransformStep, _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 2 for calling a global function with example usage: set_up_transform_step(recipe_root, transform_user_module) and returns: transform_step,  transform_step_output_dir,  split_step_output_dir