Attach/detach Storage Disk one after another. Getting Error. can we add multiple Disks to VM in Single call

getting error while running self.one.vm.detach_disk(disk_id) one after another.

my_account_python_3.11_venv/lib/python3.11/site-packages/pyone/__init__.py,
line 288, in __response
raise OneActionException(message)
pyone.OneActionException: [one.vm.detach] Could not detach disk from VM 15504,
wrong state HOTPLUG_EPILOG_POWEROFF.

is there any way where we pass an array of disk_ids while detaching muliple disks and avoid HOTPLUG_EPILOG_POWEROFF state of vm.
one way is to call detach_disk() function inside a loop and wait for some time. but it is not effective in case of large number of disk detaching to a single vm.

Once a disk hotplug operation is triggered the VM enters the state of HOTPLUG, which prevents several operations like another disk hotplug from being executed until the VM gets back to the stable state. You’ll have to query the state in the loop until it reaches the desired state.

Thankyou.:clap: