<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_adapters(self, adapters):
 """ Sets the number of Ethernet adapters for this VirtualBox VM instance. :param adapters: number of adapters """


        # check for the maximum adapters supported by the VM
        vm_info = yield from self._get_vm_info()
        chipset = "piix3"  # default chipset for VirtualBox VMs
        self._maximum_adapters = 8  # default maximum network adapter count for PIIX3 chipset
        if "chipset" in vm_info:
            chipset = vm_info["chipset"]
            max_adapter_string = "Maximum {} Network Adapter count".format(chipset.upper())
            if max_adapter_string in self._system_properties:
                try:
                    self._maximum_adapters = int(self._system_properties[max_adapter_string])
                except ValueError:
                    log.error("Could not convert system property to integer: {} = {}".format(max_adapter_string, self._system_properties[max_adapter_string]))
            else:
                log.warning("Could not find system property '{}' for chipset {}".format(max_adapter_string, chipset))

        log.info("VirtualBox VM '{name}' [{id}] can have a maximum of {max} network adapters for chipset {chipset}".format(name=self.name,
                                                                                                                           id=self.id,
                                                                                                                           max=self._maximum_adapters,
                                                                                                                           chipset=chipset.upper()))
        if adapters > self._maximum_adapters:
            raise VirtualBoxError("The configured {} chipset limits the VM to {} network adapters. The chipset can be changed outside GNS3 in the VirtualBox VM settings.".format(chipset.upper(),
                                                                                                                                                                                  self._maximum_adapters))

        self._ethernet_adapters.clear()
        for adapter_number in range(0, adapters):
            self._ethernet_adapters[adapter_number] = EthernetAdapter()

        self._adapters = len(self._ethernet_adapters)
        log.info("VirtualBox VM '{name}' [{id}] has changed the number of Ethernet adapters to {adapters}".format(name=self.name,
                                                                                                                  id=self.id,
                                                                                                                  adapters=adapters))