def pandas_udf(f, returnType, functionType):

    Step 1: verify the returnType to ensure its validity (either
        `pyspark.sql.types.*` or a string representing a PySpark data type).

    Step 2: assess the UDF type (functionType) based on the signature (Spark 3)
    or the PandasUDFType (Spark 2.3+))

    Step 3: Create the UDF object wrapping the function `f` passed as an
    argument (in PySpark, this is done through the
              `pyspark.sql.udf._create_udf()` function)

    Return: the newly formed UDF from step 3.
