code: def test_model(
      X_test_path: components.InputPath("np_array"),  # noqa: F821,N803
      y_test_path: components.InputPath("np_array"),  # noqa: F821
      model_path: components.InputPath("sklearn_model"),  # noqa: F821
  ) -> NamedTuple(
      "Output",
      [("accuracy", float), ("precision", float), ("recall", float)],
  ):
      from collections import namedtuple
  
      import joblib
      import numpy as np
      from sklearn.ensemble import RandomForestClassifier  # noqa: F401
      from sklearn.metrics import (
          accuracy_score,
          precision_score,
          recall_score,
      )
  
      with open(X_test_path, "rb") as f:
          X_test = np.load(f)  # noqa: N806
  
      with open(y_test_path, "rb") as f:
          y_test = np.load(f)
  
      model = joblib.load(model_path)
      preds = model.predict(X_test)
  
      accuracy = accuracy_score(y_test, preds)
      precision = precision_score(y_test, preds, average="micro")
      recall = recall_score(y_test, preds, average="micro")
  
      output = namedtuple("Output", ["accuracy", "precision", "recall"])
      return output(accuracy, precision, recall)
  
file_path: wandb/tests/functional_tests/t0_main/kfp/kfp-pipeline-sklearn.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.integration.kfp import wandb_log
  from wandb_probe import wandb_probe_package
label_desc: Use image node_id 4 for calling a global function with example usage: test_model(X_test_path, y_test_path, model_path) and returns: output