gzz function on sphere.py