code: def run_fn(fn_args: FnArgs):
      """Train the model based on given args.
  
      Args:
        fn_args: Holds args used to train the model as name/value pairs.
      """
      schema = io_utils.parse_pbtxt_file(
          fn_args.schema_file, schema_pb2.Schema()
      )
  
      x_train, y_train = _input_fn(
          fn_args.train_files, fn_args.data_accessor, schema
      )
      x_eval, y_eval = _input_fn(
          fn_args.eval_files, fn_args.data_accessor, schema
      )
  
      steps_per_epoch = _TRAIN_DATA_SIZE / _TRAIN_BATCH_SIZE
  
      estimator = MLPClassifier(
          hidden_layer_sizes=[8, 8, 8],
          activation="relu",
          solver="adam",
          batch_size=_TRAIN_BATCH_SIZE,
          learning_rate_init=0.0005,
          max_iter=int(fn_args.train_steps / steps_per_epoch),
          verbose=True,
      )
  
      # Create a pipeline that standardizes the input data before passing it to an
      # estimator. Once the scaler is fit, it will use the same mean and stdev to
      # transform inputs at both training and serving time.
      model = Pipeline(
          [
              ("scaler", StandardScaler()),
              ("estimator", estimator),
          ]
      )
      model.feature_keys = _FEATURE_KEYS
      model.label_key = _LABEL_KEY
      model.fit(x_train, y_train)
      absl.logging.info(model)
  
      score = model.score(x_eval, y_eval)
      absl.logging.info("Accuracy: %f", score)
  
      # Export the model as a pickle named model.pkl. AI Platform Prediction expects
      # sklearn model artifacts to follow this naming convention.
      os.makedirs(fn_args.serving_model_dir)
  
      model_path = os.path.join(fn_args.serving_model_dir, "model.pkl")
      with fileio.open(model_path, "wb+") as f:
          pickle.dump(model, f)
  
file_path: tfx/tfx/examples/penguin/experimental/penguin_utils_sklearn.py
imports: import os
  import pickle
  from typing import Tuple
  import absl
  import numpy
  from sklearn.neural_network import MLPClassifier
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import StandardScaler
  from tfx.components.trainer.fn_args_utils import DataAccessor
  from tfx.components.trainer.fn_args_utils import FnArgs
  from tfx.dsl.io import fileio
  from tfx.utils import io_utils
  from tfx_bsl.tfxio import dataset_options
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 2 for calling a global function with example usage: run_fn(fn_args) without return types