Write out a dataset through VTK algorithm used in the to generate python script

Hi everyone
I am trying writer out a unstructured grid dataset with vtkXMLUnstructuredGridWriter, which can be imported into paraview GUI to generate python script for the paraview catalyst. I have generated the .vtu file but it seems does not work.
Do I need to write out the .pvtu file for paraview catalyst and how should I use the vtkXMLUnstructuredGridWriter to achieve this goal?
Thanks