code: def preprocess_data(
      X_train_path: components.OutputPath(
          "np_array"
      ),  # noqa: F821,N803
      X_test_path: components.OutputPath("np_array"),  # noqa: F821,N803
      y_train_path: components.OutputPath("np_array"),  # noqa: F821
      y_test_path: components.OutputPath("np_array"),  # noqa: F821
      mlpipeline_ui_metadata_path: components.OutputPath(),
      seed: int = 1337,
  ):
      import json
  
      import numpy as np
      import wandb
      from sklearn import datasets
      from sklearn.model_selection import train_test_split
  
      def add_wandb_visualization(run, mlpipeline_ui_metadata_path):
          """NOTE: To use this, you must modify your component to have an output called `mlpipeline_ui_metadata_path` AND call `wandb.init` yourself inside that component.
  
          Example usage:
  
          def my_component(..., mlpipeline_ui_metadata_path: OutputPath()):
              import wandb
              from wandb.integration.kfp.helpers import add_wandb_visualization
  
              with wandb.init() as run:
                  add_wandb_visualization(run, mlpipeline_ui_metadata_path)
  
                  ... # the rest of your code here
          """
  
          def get_iframe_html(run):
              return f'<iframe src="{run.url}?kfp=true" style="border:none;width:100%;height:100%;min-width:900px;min-height:600px;"></iframe>'
  
          iframe_html = get_iframe_html(run)
          metadata = {
              "outputs": [
                  {
                      "type": "markdown",
                      "storage": "inline",
                      "source": iframe_html,
                  }
              ]
          }
  
          with open(mlpipeline_ui_metadata_path, "w") as metadata_file:
              json.dump(metadata, metadata_file)
  
      with wandb.init() as run:
          add_wandb_visualization(run, mlpipeline_ui_metadata_path)
  
          X, y = datasets.load_iris(return_X_y=True)  # noqa: N806
          (
              X_train,
              X_test,
              y_train,
              y_test,
          ) = train_test_split(  # noqa: N806
              X, y, test_size=0.2, random_state=seed
          )
  
          with open(X_train_path, "wb") as f:
              np.save(f, X_train)
  
          with open(y_train_path, "wb") as f:
              np.save(f, y_train)
  
          with open(X_test_path, "wb") as f:
              np.save(f, X_test)
  
          with open(y_test_path, "wb") as f:
              np.save(f, y_test)
  
file_path: wandb/tests/functional_tests/t0_main/kfp/kfp-pipeline-helper.py
imports: import os
  import random
  from typing import NamedTuple
  import kfp
  import kfp.dsl
  from kfp import components
  from kubernetes.client.models import V1EnvVar
  from wandb_probe import wandb_probe_package
label_desc: Use image node_id 2 for calling a global function with example usage: preprocess_data(X_train_path, X_test_path, y_train_path, y_test_path, mlpipeline_ui_metadata_path, seed) and returns: str, run, str