@staticmethod
def size_to_str(size):
    """
        Convert size in bytes to string with appropriate units.
        """
    size = size / 1000
    if size > 1000000:
        return '{:5.1f}G'.format(size / 1000000)
    elif size > 1000:
        return '{:5.1f}M'.format(size / 1000)
    else:
        return '{:>5}K'.format(round(size))
