code: def http_udf(func):
      def composition(*args):
          return requests_to_spark(func(*args).prepare())
  
      return udf(composition, HTTPRequestDataType)
  
imports: from pyspark import SparkContext
  from pyspark.sql.types import StructType
  from pyspark.sql.functions import col, udf
  import json
label_desc: Use image node_id 2 for calling a global function with example usage: http_udf(func) and returns: udf, requests_to_spark