def strtime(span, colour=False):
    """
    Return a moderately long string, providing a human-interpretable
    representation of the provided timespan
    """
    if colour:
        cms = '\x1b[0m'
        cs = '\x1b[38;5;246m'
        cm = '\x1b[38;5;239m'
        ch = '\x1b[38;5;250m'
        cd = '\x1b[38;5;242m'
        cr = '\x1b[0m'
    else:
        cr = cd = ch = cm = cs = cms = ''
    if span < 1:
        return cms + '{:6.3f}ms'.format(span * 1000) + cr
    if span < 120:
        full = int(span)
        return cs + '{:3d}s '.format(full) + cms + '{:3d}ms'.format(int((
            span - full) * 1000)) + cr
    if span < 3600:
        full = int(span / 60)
        return cm + '{:2d}m '.format(full) + cs + '{:2d}s'.format(int(span -
            full * 60)) + cr
    if span < 86400:
        full = int(span / 3600)
        return ch + '{:2d}h '.format(full) + cm + '{:2d}m'.format(full, int
            (span / 60 - full * 60)) + cr
    else:
        full = int(span / 86400)
        return cd + '{:3d}d '.format(full) + ch + '{:2d}h'.format(int(span /
            3600 - full * 24)) + cr
