def METHOD_NAME(obj, face_size, method, approx=0.2, **kwargs):
    assert obj.type == 'MESH'
    assert 0 <= approx and approx <= 0.5
    logger.debug(f'adapt_mesh_resolution on {obj.name} with {method=} to {face_size=:.6f}')
    if len(obj.data.polygons) == 0:
        logger.debug(f'Ignoring adapt_mesh_resolution on {obj.name=} due to no polygons')
        return
    lmin, lmax = min_max_edgelen(obj.data)
    if method == 'subdivide':
        if lmax > face_size:
            subdivide_to_face_size(obj, from_facesize=lmax, to_facesize=face_size, **kwargs)
    elif method == 'subdiv_by_area':
        areas = np.zeros(len(obj.data.polygons))
        obj.data.polygons.foreach_get('area', areas)
        approx_facesize = np.sqrt(np.percentile(areas, q=1-approx))
        if approx_facesize > face_size:
            subdivide_to_face_size(obj, from_facesize=approx_facesize, to_facesize=face_size, **kwargs)
        else:
            logger.debug(f'No subdivision necessary on {obj.name=} {approx_facesize} < {face_size}')
    elif method == 'merge_down':
        if lmin < face_size:
            butil.merge_by_distance(obj, face_size)
    elif method == 'remesh':
        remesh_with_attrs(obj, face_size, **kwargs)
    elif method == 'sharp_remesh':
        sharp_remesh_with_attrs(obj, face_size, **kwargs)
    else:
        raise ValueError(f'Unrecognized adapt_mesh_resolution(..., {method=})'