def update_placeholder_formats(self, format_string, placeholder_formats):
<EOL>output = []<EOL>for token in self.tokens(format_string):<EOL><INDENT>if (<EOL>token.group("<STR_LIT>")<EOL>and (not token.group("<STR_LIT>"))<EOL>and token.group("<STR_LIT:key>") in placeholder_formats<EOL>):<EOL><INDENT>output.append(<EOL>"<STR_LIT>"<EOL>% (token.group("<STR_LIT:key>"), placeholder_formats[token.group("<STR_LIT:key>")])<EOL>)<EOL>continue<EOL><DEDENT>value = token.group(<NUM_LIT:0>)<EOL>output.append(value)<EOL><DEDENT>return u"<STR_LIT>".join(output)<EOL>
Update a format string adding formats if they are not already present.