code: def output_vm(gandi, vm, datacenters, output_keys, justify=10):
      
      output_generic(gandi, vm, output_keys, justify)
  
      if 'datacenter' in output_keys:
          for dc in datacenters:
              if dc['id'] == vm['datacenter_id']:
                  dc_name = dc.get('dc_code', dc.get('iso', ''))
                  break
  
          output_line(gandi, 'datacenter', dc_name, justify)
  
      if 'ip' in output_keys:
          for iface in vm['ifaces']:
              gandi.separator_line()
              output_line(gandi, 'bandwidth', iface['bandwidth'], justify)
  
              for ip in iface['ips']:
                  ip_addr = ip['ip']
  
                  output_line(gandi, 'ip%s' % ip['version'], ip_addr, justify)
docs: Helper to output a vm information.