docs: def to_unit(value, unit='B'):
      """Convert bytes to give unit."""
      byte_array = ['B', 'KB', 'MB', 'GB', 'TB']
  
      if not isinstance(value, (int, float)):
          value = float(value)
  
      if unit in byte_array:
          result = value / 1024**byte_array.index(unit)
          return round(result, PRECISION), unit
  
      return value