Generally, the calibrated MSs for pipeline-calibrated ALMA data should be generated with the scriptForPI.py and the CASA version indicated in the README.
If your data was pipeline calibrated with any of the CASA 4.5.X versions (X=1, 2, 3), you can (and this is recommended) perform the restore with the latest version CASA 4.5.3.
The pipeline 4.5.2 R4B version 36252 (which was only made available to the ALMA observatory) is equivalent to the one in CASA 4.5.3.