I think that it is easier to read code if this condition is in old variable like
```
  part_used = disk.fetch("partitions", []).any? do |partition|
    !DeviceMounted(partition["device"]).empty? || IsUsedBy(partition)
  end
  if part_used
     ...
```