code: def parametric_action_preprocessing(
      df,
      actions: List[str],
      multi_steps: Optional[int] = None,
      include_possible_actions: bool = True,
  ):
      assert (
          not include_possible_actions
      ), "current we don't support include_possible_actions"
  
      next_map_udf = make_next_udf(
          multi_steps, MapType(LongType(), FloatType())
      )
      df = df.withColumn("next_action", next_map_udf("next_action"))
  
      def make_not_terminal_udf():
          """Return true iff next_action is an empty map"""
  
          def get_not_terminal(next_action):
              return len(next_action) > 0
  
          return udf(get_not_terminal, BooleanType())
  
      not_terminal_udf = make_not_terminal_udf()
      df = df.withColumn(
          "not_terminal", not_terminal_udf("next_action")
      )
  
      df = make_sparse2dense(df, "action", actions)
      df = make_sparse2dense(df, "next_action", actions)
      return df
  
imports: import logging
  from typing import List, Optional, Tuple
  from pyspark.sql.functions import col, crc32, explode, map_keys, udf
  from pyspark.sql.types import ArrayType, BooleanType, FloatType, LongType, MapType, StructField, StructType
  from reagent.data.data_fetcher import DataFetcher
  from reagent.data.spark_utils import get_spark_session, get_table_url
  from reagent.workflow.types import Dataset, TableSpec
label_desc: Use image node_id 13 for calling a global function with example usage: parametric_action_preprocessing(df, actions, multi_steps, include_possible_actions) and returns: df, udf, unknown