human
I wrote the below code

    file_list = [filename for filename in file_list if filename.endswith('.py')]
    def key(item):
        return len(item)
    file_list.sort(key=key)
    return file_list

What's a good function header?
 Here's a good function header?
assistant
#Here's a good function header.

def filter_and_sort(file_list):