def register_types(name, *types):
type_names.setdefault(name, set())<EOL>for t in types:<EOL><INDENT>if t in media_types:<EOL><INDENT>type_names[media_types[t]].discard(t)<EOL><DEDENT>media_types[t] = name<EOL>type_names[name].add(t)<EOL><DEDENT>
Register a short name for one or more content types.