import math


def fmt_bytes(size_bytes):
    """Return a nice 'total_size' string with Gb, Mb, Kb, and Byte ranges"""
    units = ["Bytes", "KB", "MB", "GB"]
    if size_bytes == 0:
        return f"{0} Bytes"
    for unit in units:
        digits = int(math.log10(size_bytes)) + 1
        if digits < 4:
            return f"{round(size_bytes, 1)} {unit}"
        size_bytes /= 1024
    return f"{size_bytes} TB"