def allowed(name, collection='<STR_LIT:all>'):
if not valid(name):<EOL><INDENT>return False<EOL><DEDENT>blacklist = names()<EOL>for forbidden in blacklist[collection]:<EOL><INDENT>if name.lower() == forbidden.lower():<EOL><INDENT>return False<EOL><DEDENT>if forbidden.endswith('<STR_LIT:*>'):<EOL><INDENT>if name.lower().startswith(forbidden[:-<NUM_LIT:1>].lower()):<EOL><INDENT>return False<EOL><DEDENT><DEDENT>if forbidden.startswith('<STR_LIT:/>'):<EOL><INDENT>if not allowed(name, collection=forbidden[<NUM_LIT:1>:]):<EOL><INDENT>return False<EOL><DEDENT><DEDENT><DEDENT>return True<EOL>
Return true if this name is allowed (e.g. not in the forbidden list,
indicated by 'collection'), false otherwise.