def METHOD_NAME(names, pat, norm_paths=True, case_sensitive=True, sep=None):
    """Return the subset of the list NAMES that match PAT."""
    result = []
    pat = _norm_paths(pat, norm_paths, sep)
    match = _compile_pattern(pat, case_sensitive)
    for name in names:
        m = match(_norm_paths(name, norm_paths, sep))
        if m:
            result.append((name,
                           tuple(_norm_paths(p, norm_paths, sep) for p in m.groups())))
    return result