You have encountered 'function failed to build' error due to UDF Python is currently in Preview, which means it might have limited support. You can check the release note for more updates.