def sort_sflats(butler, sflat_files, exptime_cut=20.):
    """Sort a set of superflat image filenames into low and high exposures

    Parameters
    ----------
    butler : `Butler` or `None`
        Data Butler (or none)
    sflat_files : `list`
        List of superflat files
    exptime_cute : `float`
        Cut between low and high exposures

    Returns
    -------
    sflats_l : `list`
        Low exposure superflats
    sflats_h : `list`
        High exposure superflats
    """
    sflats_l = []
    sflats_h = []

    for sflat in sflat_files:
        if butler is None:
            if sflat.find('_L_') >= 0:
                sflats_l.append(sflat)
            elif sflat.find('flat_L') >= 0:
                sflats_l.append(sflat)
            elif sflat.find('_H_') >= 0:
                sflats_h.append(sflat)
            elif  sflat.find('flat_H') >= 0:
                sflats_h.append(sflat)
        else:
            exp_time = butler.queryMetadata('raw', 'EXPTIME', sflat)[0]
            if exp_time < exptime_cut:
                sflats_l.append(sflat)
            else:
                sflats_h.append(sflat)

    return (sflats_l, sflats_h)