Writing query creating #sql function that is run inside plpython fu...