Format stats of the sync output.

        :param cnt:
        :return:

def format_sync_stats(self, cnt):
        '''
        Format stats of the sync output.

        :param cnt:
        :return:
        '''
        stats = salt.utils.odict.OrderedDict()
        if cnt.get('retcode') == salt.defaults.exitcodes.EX_OK:
            for line in cnt.get('stdout', '').split(os.linesep):
                line = line.split(': ')
                if len(line) == 2:
                    stats[line[0].lower().replace(' ', '_')] = line[1]
            cnt['transfer'] = stats
            del cnt['stdout']

        # Remove empty
        empty_sections = []
        for section in cnt:
            if not cnt[section] and section != 'retcode':
                empty_sections.append(section)
        for section in empty_sections:
            del cnt[section]

        return cnt