added the python code and updating changes for importing slices