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

getting error while running one after another.

line 288, in __response
raise OneActionException(message)
pyone.OneActionException: [one.vm.detach] Could not detach disk from VM 15504,

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.