code: def make_next_udf(multi_steps: Optional[int], return_type):
      """Generic udf to get next (after multi_steps) item, provided item type."""
  
      def get_next(next_col):
          return (
              next_col
              if multi_steps is None
              else next_col[min(len(next_col), multi_steps) - 1]
          )
  
      return udf(get_next, return_type)
  
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 7 for calling a global function with example usage: make_next_udf(multi_steps, return_type) and returns: udf, unknown