def METHOD_NAME(self, lines):
    def repl(m):
        try:
            lexer = get_lexer_by_name(m.group(1))
        except (ValueError, NameError):
            lexer = TextLexer()
        code = m.group(2).replace('\t', '    ')
        code = pygments.highlight(code, lexer, self.formatter)
        code = code.replace('\n\n', '\n&nbsp;\n').replace('\n', '<br />').replace('\\@', '@')
        return '\n\n%s\n\n' % code
    ret = self.pattern.sub(repl, "\n".join(lines))
    return ret.split("\n")