def pop_format_context(self, expl_expr):
current = self.stack.pop()<EOL>if self.stack:<EOL><INDENT>self.explanation_specifiers = self.stack[-<NUM_LIT:1>]<EOL><DEDENT>keys = [ast.Str(key) for key in current.keys()]<EOL>format_dict = ast.Dict(keys, list(current.values()))<EOL>form = ast.BinOp(expl_expr, ast.Mod(), format_dict)<EOL>name = "<STR_LIT>" + str(next(self.variable_counter))<EOL>self.on_failure.append(ast.Assign([ast.Name(name, ast.Store())], form))<EOL>return ast.Name(name, ast.Load())<EOL>
Format the %-formatted string with current format context.

        The expl_expr should be an ast.Str instance constructed from
        the %-placeholders created by .explanation_param().  This will
        add the required code to format said string to .on_failure and
        return the ast.Name instance of the formatted string.