Sequence an ERPNext patch to happen before a Frappe patch within the same version

Anyone knows how to sequence an ERPNext patch to happen before a Frappe patch say if both patches are in v8?

This is causing a problem currently. I wanna push a PR to fix this Error in update to latest 8.0.29 but need some guidance on this. Thanks guys.