File size: 377 Bytes
cdc5783
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from typing import List

BlockTagNames = {'fifty'}
BlockTagContents = ['voice']


def filter_tags(tags: List[str]) -> List[str]:
    tags = [tag.strip().lower() for tag in tags]
    tags = [tag for tag in tags
            if len(tag) > 2
            and tag not in BlockTagNames
            and not any(content in tag for content in BlockTagContents)]
    return sorted(tags)