def render_span(begin, end, unidirectional=False):
    if end - begin == 1:
        return ['───►']
    elif end - begin == 2:
        return [
            '──┐',
            '──┴►',
        ] if unidirectional else [
            '◄─┐',
            '◄─┴►',
        ]

    rows = []
    for i in range(begin, end):
        if i == (end - begin) // 2 + begin:
            rows.append('  ├►')
        elif i == begin:
            rows.append('──┐' if unidirectional else '◄─┐')
        elif i == end - 1:
            rows.append('──┘' if unidirectional else '◄─┘')
        else:
            rows.append('  │')
    return rows