code: def _caps_add_machine(machines, node):
      '''
      Parse the <machine> element of the host capabilities and add it
      to the machines list.
      '''
      maxcpus = node.get('maxCpus')
      canonical = node.get('canonical')
      name = node.text
  
      alternate_name = ""
      if canonical:
          alternate_name = name
          name = canonical
  
      machine = machines.get(name)
      if not machine:
          machine = {'alternate_names': []}
          if maxcpus:
              machine['maxcpus'] = int(maxcpus)
          machines[name] = machine
      if alternate_name:
          machine['alternate_names'].append(alternate_namef _caps_add_machine(machines, node):
      '''
      Parse the <machine> element of the host capabilities and add it
      to the machines list.
      '''
      maxcpus = node.get('maxCpus')
      canonical = node.get('canonical')
      name = node.text
  
      alternate_name = ""
      if canonical:
          alternate_name = name
          name = canonical
  
      machine = machines.get(name)
      if not machine:
          machine = {'alternate_names': []}
          if maxcpus:
              machine['maxcpus'] = int(maxcpus)
          machines[name] = machine
      if alternate_name:
          machine['alternate_names'].append(alternate_name)
docs: Parse the <machine> element of the host capabilities and add it
      to the machines list.