def METHOD_NAME(times):
    """Format `times` into a string representing approximate milliseconds.
    `times` is a collection of durations in seconds.
    """
    ordered = sorted(times)
    n = len(ordered) - 1
    assert n >= 0
    lower = int(ordered[int(math.floor(n * 0.05))] * 1000)
    upper = int(ordered[int(math.ceil(n * 0.95))] * 1000)
    if upper == 0:
        return "< 1ms"
    elif lower == upper:
        return f"~ {lower}ms"
    else:
        return f"~ {lower}-{upper} ms"