def buildTagMap(default, *args):
built = {}<EOL>for portion in args:<EOL><INDENT>if hasattr(portion, '<STR_LIT>'):<EOL><INDENT>for k,v in list(portion.items()):<EOL><INDENT>built[k] = v<EOL><DEDENT><DEDENT>elif isList(portion):<EOL><INDENT>for k in portion:<EOL><INDENT>built[k] = default<EOL><DEDENT><DEDENT>else:<EOL><INDENT>built[portion] = default<EOL><DEDENT><DEDENT>return built<EOL>
Turns a list of maps, lists, or scalars into a single map.
    Used to build the SELF_CLOSING_TAGS, NESTABLE_TAGS, and
    NESTING_RESET_TAGS maps out of lists and partial maps.