code: func (l VirtualDeviceList) CreateEthernetCard(name string, backing types.BaseVirtualDeviceBackingInfo) (types.BaseVirtualDevice, error) {
  	ctypes := EthernetCardTypes()
  
  	if name == "" {
  		name = ctypes.deviceName(ctypes[0])
  	}
  
  	found := ctypes.Select(func(device types.BaseVirtualDevice) bool {
  		return l.deviceName(device) == name
  	})
  
  	if len(found) == 0 {
  		return nil, fmt.Errorf("unknown ethernet card type '%s'", name)
  	}
  
  	c, ok := found[0].(types.BaseVirtualEthernetCard)
  	if !ok {
  		return nil, fmt.Errorf("invalid ethernet card type '%s'", name)
  	}
  
  	c.GetVirtualEthernetCard().Backing = backing
  
  	return c.(types.BaseVirtualDevice), nil
  }
docs: // CreateEthernetCard creates a new VirtualEthernetCard of the given name name and initialized with the given backing.