<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def visualise(seq, sort=lambda x: x[0]):
 """visualises as seq or dictionary"""

    frmt = "{:6} {:8,d} {}"
    if isinstance(seq, dict):
        seq = seq.items()
    if sort:
        seq = sorted(seq, key=sort)
    mx, mn = max([i[1] for i in seq]), min([i[1] for i in seq])  
    range = mx - mn
    for i in seq:
        v = int((i[1] * 100) / range)
        print (frmt.format(i[0], i[1], "*" * v))