code: def exists(f: Callable[[Any], bool]) -> udf:
      """Create a user-defined function.
  
      It takes a list expressed as a column of type ``ArrayType(AnyType)`` as an argument and returns a boolean value indicating
      whether any element in the list is true according to the argument ``f`` of the ``exists()`` function.
  
      :param f: Callable function - A callable function that takes an element of
      type Any and returns a boolean value.
      :return: A user-defined function that takes
      a list expressed as a column of type ArrayType(AnyType) as an argument and
      returns a boolean value indicating whether any element in the list is true
      according to the argument ``f`` of the ``exists()`` function.
      :rtype: UserDefinedFunction
      """
  
      def temp_udf(list_: list) -> bool:
          return any(map(f, list_))
  
      return F.udf(temp_udf, BooleanType())
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  import re
  import uuid
  from typing import Any
  import pyspark.sql.functions
  from pyspark.sql.types import ArrayType, BooleanType, StringType
label_desc: Use image node_id 5 for calling a global function with example usage: exists(f) and returns: F, any