code: def near_sphere(self, x, y, max_distance=None):
          
          expr = {
              self : {'$nearSphere' : [x, y]}
          }
          if max_distance is not None:
              expr[self]['$maxDistance'] = max_distance
          return QueryExpression(expr)
docs: Return documents near the given point using sphere distances