def geom_output(func, argtypes, offset=None):
    # Setting the argument types
    func.argtypes = argtypes

    if not offset:
        # When a geometry pointer is directly returned.
        func.restype = c_void_p
        func.errcheck = check_geom
    else:
        # Error code returned, geometry is returned by-reference.
        func.restype = c_int
        def geomerrcheck(result, func, cargs):
            return check_geom_offset(result, func, cargs, offset)
        func.errcheck = geomerrcheck

    return func
Insert list of Django objects in one SQL query. Objects must be
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/django/contrib/gis/gdal/prototypes/generation.py/geom_output--crossover with--dataset/ETHPy150Open gtaylor/django-eve-db/eve_db/ccp_importer/bulkops.py/insert_many