human
Complete this python program:
def cpustats():
assistant
#Here is the Python program you requested.

    """Return the CPU stats for this minion
    .. versionchanged:: 2016.11.4
    Added support for AIX
    CLI Example:
    .. code-block:: bash
    salt \*\ status.cpustats
    """
    def linux_cpustats():
        '\n                                linux    specific    implementation    of    cpustats\n                                '
        ret = {}
        try:
            with salt.utils.files.fopen('/proc/stat', 'r') as fp_:
                stats = fp_.read()
        except IOError:
            pass
        else:
            for line in stats.splitlines():
                if (not line):
                    continue
                comps = line.split()
                if (comps[0] == 'cpu'):
                    ret[comps[0]] = {'idle': _number(comps[4]), 'iowait': _number(comps[5]), 'irq': _number(comps[6]), 'nice': _number(comps[2]), 'softirq': _number(comps[7]), 'steal': _number(comps[8]), 'system': _number(comps[3]), 'user': _number(comps[1])}
                elif (comps[0] == 'intr'):
                    ret[comps[0]] = {'total': _number(comps[1]), 'irqs': [_number(x) for x in comps[2:]]}
                elif (comps[0] == 'softirq'):
                    ret[comps[0]] = {'total': _number(comps[1]), 'softirqs': [_number(x) for x in comps[2:]]}
                else:
                    ret[comps[0]] = _number(comps[1])
        return ret
    def freebsd_cpustats():
        '\n                                freebsd    specific    implementation    of    cpustats\n                                '
        vmstat = __salt__['cmd.run']('vmstat    -P').splitlines()
        vm0 = vmstat[0].split()
        cpu0loc = vm0.index('cpu0')
        vm1 = vmstat[1].split()
        usloc = vm1.index('us')
        vm2 = vmstat[2].split()
        cpuctr = 0
        ret = {}
        for cpu in vm0[cpu0loc:]:
            ret[cpu] = {'us': _number(vm2[(usloc + (3 * cpuctr))]), 'sy': _number(vm2[((usloc + 1) + (3 * cpuctr))]), 'id': _number(vm2[((usloc + 2) + (3 * cpuctr))])}
            cpuctr += 1
        return ret
    def sunos_cpustats():
        '\n                                sunos    specific    implementation    of    cpustats\n                                '
        mpstat =...