def filesize_converter(size):
    """
    Convert filesize unit to KB, MB and GB based on the size value.

    # Arguments:
        size: number of bytes

    # Returns:
        converted size.
    """

    if size <= 1024:
        size_report = str(round(size, 2)) + " KB"
    elif size <= 1024*1024:
        size_report = str(round(size/1024, 2)) + " MB"
    else:
        size_report = str(round(size/(1024*1024), 2)) + " GB"
    return size_report