code: def argmax(col: Union[str, Column]) -> Column:
      """
      returns expression for finding the argmax in an array column
      :param col: array column to find argmax of
      :return: expression which can be used in `select` or `withColumn`
      """
      return F.expr(f"array_position({col}, array_max({col})) - 1")
  
imports: import json
  from enum import Enum
  from typing import Union
  from pyspark.sql import Column
  import pyspark.sql.functions
label_desc: Use image node_id 2 for calling a global function with example usage: argmax(col) and returns: F