I reached out to google regarding my query. They told me that because my project has a VPC-SC, Python UDF functions will not work. The solution is create another project that doesn't have VPC-SC.