@staticmethod
def human_size(size, precision=2):
    """
        Humanize accepted bytes
        :param int size: bytes
        :param int precision: delimiter
        :return:
        """
    suffixes = ['B', 'KB', 'MB', 'GB', 'TB']
    suffix_index = 0
    size = int(size)
    while size > 1024 and suffix_index < 4:
        suffix_index += 1
        size /= 1024
    return '%.*f%s' % (precision, size, suffixes[suffix_index])
