def post_render_content(sender, instance, **kwargs):
    if instance.source_content is None:
        return

    content = instance.source_content
    code_regex = re.compile(r'(<code(.*?)</code>)', re.DOTALL)
    code_blocks = []

    for i, m in enumerate(code_regex.finditer(content)):
        code = m.group(0)

        # if there is a lang attribute, use that
        if code.find('lang') > 0:
            soup = BeautifulSoup(code)
            language = soup.code['lang']

            # if lexer doesn't exist set to text
            try:
                lexer = lexers.get_lexer_by_name(language)
            except ClassNotFound:
                lexer = lexers.get_lexer_by_name('text')


            # remove the code tags
            code = code.replace('</code>', '')
            code = code.replace('<code>', '')
            code = re.sub('<code(.*?)>', '', code)

            # create the pygmented code with the lexer
            pygmented_string = pygments.highlight(
                code,
                lexer,
                formatters.HtmlFormatter())

            # put the code blocks into the list for processintg later
            code_blocks.append(pygmented_string)

        else:

            # this is for the inline code snippets
            code_blocks.append(code)

        # replace the <code> tags with placeholders that can be used to replace
        content = content.replace(
            m.string[m.start():m.end()], 'OMCB|%s|OMCB' % i)

    # replaced placeholders with the actual code
    for i, code in enumerate(code_blocks):
        content = content.replace('<p>OMCB|%s|OMCB</p>' % i, code)
        content = content.replace('OMCB|%s|OMCB' % i, code)

    # do the markdown
    content = markdown(
        content,
        extras=[
            'footnotes',
            'header-ids',
            'markdown-in-html',
            'smarty-pants'])

    # render the content now that code is out of the way
    # this is very hacky - must find a better way to do it
    c = template.Context({'instance': instance})
    content = '{% load omblog_tags %}' + content
    t = template.Template(content)
    content = t.render(c)

    instance.rendered_content = content
Try to unify the two given types.  A third type is returned,
dataset/ETHPy150Open jamiecurle/django-omblog/omblog/listeners.py/post_render_content--crossover with--dataset/ETHPy150Open numba/numba/numba/typing/context.py/BaseContext.unify_pairs