Python functionality for RECONSTRUCT.