def METHOD_NAME(self, file_size):
    """
    A custom function to convert file size to KB, MB, GB and return with the unit
    """
    try:
        n = float(file_size)
    except ValueError:
        return ""
    units = ['KB', 'MB', 'GB']
    i = 0
    while n >= 1000 and i < len(units) - 1:
        n /= 1000
        i += 1
    return f"{n:.1f} {units[i]}"