FIX: Refactoring of lock acquisition to avoid repetitive code and re-releasing of locks;
FIX: Refactoring of lock acquisition to avoid repetitive code and re-releasing of locks;

nigroup/pypet,nigroup/pypet,SmokinCaterpillar/pypet,SmokinCaterpillar/pypet