def check_geom(result, func, cargs):
 if (not result):
  raise GEOSException(('Error encountered checking Geometry returned from GEOS C function "%s".' % func.__name__))
 return result

def check_geom ( result , func , cargs ) : if ( not result ) : raise GEOSException ( ( 'Error encountered checking Geometry returned from GEOS C function "%s".' % func . __name__ ) ) return result
checks a function that returns a geometry .