def METHOD_NAME(ProjectFiles, parent, name, files, libs, project_path):
    Filter = SubElement(parent, 'Filter')
    Filter.set('Name', name) #set group name to group
    for f in files:
        fn = f.rfile()
        name = fn.name
        path = os.path.dirname(fn.abspath)
        path = _make_path_relative(project_path, path)
        path = os.path.join(path, name)
        try:
            path = path.decode(fs_encoding)
        except:
            path = path
        File = SubElement(Filter, 'File')
        File.set('RelativePath', path)
    for lib in libs:
        name = os.path.basename(lib)
        path = os.path.dirname(lib)
        path = _make_path_relative(project_path, path)
        path = os.path.join(path, name)
        File = SubElement(Filter, 'File')
        try:
            path = path.decode(fs_encoding)
        except:
            path = path
        File.set('RelativePath', path)