def display_gpu_status(hosts, data):
    """Display gpu status
    """
    for host in hosts:
        gpu_stat = data[host]['gpus']
        app_stat = data[host]['apps']
        print('[{:.30}]'.format(host), end='')
        if len(gpu_stat) == 0:
            print('\n|{}|'.format(' ERROR '), end='\n')
            continue
        else:
            print('{:>26}'.format('Running [{:2}/{:2}]'.format(len(app_stat
                ), len(gpu_stat))), end='\n')
        for i, gpu in enumerate(gpu_stat):
            if len(gpu) != 9:
                continue
            print('| {} | Temp {:2s}C | Util {:>5s} | Mem {:>6s} / {:9s} |'
                .format(i, gpu[5], gpu[6], gpu[7][:-4], gpu[8]))
