Sql Create Function Return Value In Python