def METHOD_NAME(a, b, type_):
    """Render the comparison of `a` and `b` as HTML.
    :param a: old value
    :param b: new value
    :param type_: the type determining how the values should be compared
    """
    if type_ in ('number', 'enum', 'bool', 'datetime', 'timedelta'):
        if a in (None, ''):
            a = '\N{EMPTY SET}'
        if b in (None, ''):
            b = '\N{EMPTY SET}'
        return f'{a} \N{RIGHTWARDS ARROW} {b}'
    elif type_ == 'string':
        return '{} \N{RIGHTWARDS ARROW} {}'.format(a or '\N{EMPTY SET}', b or '\N{EMPTY SET}')
    elif type_ == 'list':
        return _diff_list(a or [], b or [])
    elif type_ == 'struct_list':
        return _diff_list([repr(x) for x in a or []], [repr(x) for x in b or []])
    elif type_ == 'text':
        return _diff_text(a or '', b or '')
    else:
        raise NotImplementedError(f'Unexpected diff type: {type_}')