def check_envelope(result, func, cargs, offset=(-1)):
 env = ptr_byref(cargs, offset)
 return env

def check_envelope ( result , func , cargs , offset = ( - 1 ) ) : env = ptr_byref ( cargs , offset ) return env
checks a function that returns an ogr envelope by reference .