def byte_to_human(size):
    """Transform the size in bytes into the appropriate unit of measurement.

    :param int size: Size in bytes.

    :return: Actual size in B/KB/MB/GB.
    :rtype: str
    """
    try:
        size = int(size)
    except __HOLE__:
        return (0, "B")
    um = "B"
    if size < pow(2,20):
        size = size / pow(2,10)
        um = "KB"
    elif size < pow(2,30):
        size = size / pow(2, 20)
        um = "MB"
    else:
        size = size / pow(2, 30)
        um = "GB"

    return (size, um)
dataset/ETHPy150Open owtf/owtf/install/space_checker_utils.py/byte_to_human