Python script to overlay nifti file on dcm file

We can overlay nifti.gz file on top of .dcm series in 3D slicer. I want to do the same task in python.
Any idea or code would be great help. I can read both .dcm series and nifti file using pydicom and nibabel. But the question is how to overlap the nifti file on correct .dcm file of the series. Which is easily done in 3D slicer.
Thanks in advance :slight_smile: