How to read resting state fMRI image using SimpleITK?

I have a fMRI image of size 64,64,39,192. It is in nii.gz format. What is the process to read this image in SimpleITK? sitk.ReadImage is showing the following error.

TypeError: Invalid shape (39, 64, 64) for image data