code: def extract_month(df):
      print_with_title("extract_month input", df.head(), df.dtypes)
      transformed = df.assign(month=df["timestamp"].dt.month)
      print_with_title(
          "extract_month output", transformed.head(), transformed.dtypes
      )
      return transformed
  
file_path: mlflow/examples/spark_udf/spark_udf_datetime.py
imports: import datetime
  import random
  from pyspark.sql import SparkSession
  from sklearn.compose import ColumnTransformer
  from sklearn.datasets import load_iris
  from sklearn.neighbors import KNeighborsClassifier
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import FunctionTransformer
  import mlflow
label_desc: Use image node_id 2 for calling a global function with example usage: extract_month(df) and returns: transformed