def humantime(ms):

# Docstring
    """
    Converts timespan in milliseconds to a humanly readable string.
    
    --------------
    
    ms : int or float
        Time in milliseconds

    --------------

    Examples :
    
    >>> humantime(194159)
    '3 min, 14 sec, 159 ms'
    """
    
    time_dict = {'ms' : ms}

    time_dict['sec'] = time_dict['ms'] // 1000
    time_dict['ms'] -= 1000 * time_dict['sec']
    time_dict['min'] = time_dict['sec'] // 60
    time_dict['sec'] -= 60 * time_dict['min']
    time_dict['hs'] = time_dict['min'] // 60
    time_dict['min'] -= 60 * time_dict['hs']
    time_dict['days'] = time_dict['hs'] // 24
    time_dict['hs'] -= 24 * time_dict['days']
    
    time_str = ""
    for key in reversed([key for key in time_dict.keys()]):
        if time_dict[key] != 0 :
            time_str = f"{time_str}{time_dict[key]} {key}, "
            
    time_str = time_str.rstrip(', ')
    
    return time_str