code: def train(fpath, max_depth, max_features, n_estimators):
      """
      :param params: hyperparameters. Its structure is consistent with how search space is defined. See below.
      :param fpath: Path or URL for the training data used with the model.
      :param max_depth: RF max_depth parameter
      :param max_features: RF max_features parameter
      :param n_estimators: RF n_estimators parameter
      :return: trained model
      """
      X_train, X_test, y_train, y_test = load_data(fpath)
  
      mod = RandomForestClassifier(
          max_depth=max_depth,
          max_features=max_features,
          n_estimators=n_estimators,
      )
  
      mod.fit(X_train, y_train)
      preds = mod.predict(X_test)
      acc = accuracy_score(y_test, preds)
  
      mlparams = {
          "max_depth": str(max_depth),
          "max_features": str(max_features),
          "n_estimators": str(n_estimators),
      }
      mlflow.log_params(mlparams)
  
      mlflow.log_metric("accuracy", acc)
  
      predictions = mod.predict(X_train)
      sig = infer_signature(X_train, predictions)
  
      mlflow.sklearn.log_model(mod, "saved_models", signature=sig)
  
      return mod, sig
  
file_path: mlflow/examples/rapids/mlflow_project/src/rf_test/train_simple.py
imports: import argparse
  from cuml.ensemble import RandomForestClassifier
  from cuml.metrics.accuracy import accuracy_score
  from cuml.preprocessing.model_selection import train_test_split
  import mlflow
  import mlflow.sklearn
  from mlflow.models import infer_signature
label_desc: Use image node_id 2 for calling a global function with example usage: train(fpath, max_depth, max_features, n_estimators) and returns: mod,  sig