def get_hwinfo(ns):
    tf = TableFormatter(stdout, 0, True, {0: FIRST_COLUMN_MIN_SIZE})

    # Chassis
    try:
        chassis = get_single_instance(ns, 'LMI_Chassis')
    except Exception:
        result = [(get_colored_string('error:', RED_COLOR),
                    'Missing class LMI_Chassis. Is openlmi-hardware package installed on the server?')]
        tf.produce_output(result)
        return []

    hwinfo = chassis.Manufacturer
    if chassis.Model and chassis.Model != 'Not Specified' \
            and chassis.Model != chassis.Manufacturer:
        hwinfo += ' ' + chassis.Model
    elif chassis.ProductName and chassis.ProductName != 'Not Specified' \
            and chassis.ProductName != chassis.Manufacturer:
        hwinfo += ' ' + chassis.ProductName
    virt = getattr(chassis, 'VirtualMachine', None)
    if virt and virt != 'No':
        hwinfo += ' (%s virtual machine)' % virt
    chassis_res = [
       ('Hardware:', hwinfo),
       ('Serial Number:', chassis.SerialNumber),
       ('Asset Tag:', chassis.Tag)]
    tf.produce_output(chassis_res)

    # CPUs
    try:
        cpus = get_all_instances(ns, 'LMI_Processor')
        cpu_caps = get_all_instances(ns, 'LMI_ProcessorCapabilities')
    except Exception:
        cpus = None
        cpu_caps = None
    if cpus and cpu_caps:
        cores = 0
        threads = 0
        for i in cpu_caps:
            cores += i.NumberOfProcessorCores
            threads += i.NumberOfHardwareThreads
        cpus_res = [
            ('CPU:', '%s, %s arch' % (cpus[0].Name, cpus[0].Architecture)),
            ('CPU Topology:', '%d cpu(s), %d core(s), %d thread(s)' % \
                (len(cpus), cores, threads))]
    else:
        cpus_res = [('CPU:', 'N/A')]
    tf.produce_output(cpus_res)

    # Memory
    try:
        memory = get_single_instance(ns, 'LMI_Memory')
    except Exception:
        memory = None
    if memory:
        memory_size = format_memory_size(memory.NumberOfBlocks)
    else:
        memory_size = 'N/A GB'
    tf.produce_output([('Memory:', memory_size)])

    return []
Create an shared array initialised to zeros. Avoid object arrays, as these
dataset/ETHPy150Open openlmi/openlmi-scripts/commands/system/lmi/scripts/system/__init__.py/get_hwinfo--crossover with--dataset/ETHPy150Open aheadley/pynemap/shmem.py/zeros