def METHOD_NAME(quads=False):
    # 2d surface in 3d tests
    import netgen.meshing as meshing
    import netgen.csg as csg 
    geo = csg.CSGeometry()
    bottom   = csg.Plane (csg.Pnt(0,0,0), csg.Vec(0,0, 1) )
    surface = csg.SplineSurface(bottom)
    pts = [(0,0,0),(0,1,0),(1,1,0),(1,0,0)]
    geopts = [surface.AddPoint(*p) for p in pts]
    for p1,p2,bc in [(0,1,"left"), (1, 2,"top"),(2,3,"right"),(3,0,"bottom")]:
        surface.AddSegment(geopts[p1],geopts[p2],bc)
    geo.AddSplineSurface(surface)
    mesh = Mesh(geo.GenerateMesh(perfstepsend=meshing.MeshingStep.MESHSURFACE,quad=quads))
    for spacename in surfacespaces.keys():
        if not quads or (quads and spaces2d[spacename]["quad"]):
            for order in surfacespaces[spacename]["order"]:
                space = FESpace(type=spacename,mesh=mesh,order=order)
                for vb in surfacespaces[spacename]["vorb"]:
                    for el in space.Elements(vb):
                        assert space.GetFE(el).ndof == len(space.GetDofNrs(el)), [spacename,vb,order]
    return