def METHOD_NAME(file_set, module_base, to_remove):
    """
    Helper to remove files from a set of filenames.
    INPUT:
    - ``file_set`` -- a set of filenames.
    - ``module_base`` -- string. Name of a Python package/module.
    - ``to_remove`` -- list/tuple/iterable of strings. Either
      filenames or extensions (starting with ``'.'``)
    OUTPUT:
    This function does not return anything. The ``file_set`` parameter
    is modified in place.
    EXAMPLES::
        sage: files = set(['a/b/c.py', 'a/b/d.py', 'a/b/c.pyx'])
        sage: from sage_setup.clean import _remove
        sage: _remove(files, 'a.b', ['c.py', 'd.py'])
        sage: files
        {'a/b/c.pyx'}
        sage: files = set(['a/b/c.py', 'a/b/d.py', 'a/b/c.pyx'])
        sage: _remove(files, 'a.b.c', ['.py', '.pyx'])
        sage: files
        {'a/b/d.py'}
    """
    path = os.path.join(*module_base.split('.'))
    for filename in to_remove:
        if filename.startswith('.'):
            filename = path + filename
        else:
            filename = os.path.join(path, filename)
        remove = [filename]
        remove.append(importlib.util.cache_from_source(filename))
        file_set.difference_update(remove)