How to make this paraview script is read by all mpi ranks so that at a time I can process many files. I want to eliminate for loop

# import the simple module from the paraview
from paraview.simple import *
import numpy as np

#############################################################
for i in range(102, 276, 2):
    ###############################################################
    
    # disable automatic camera reset on 'Show'
    #paraview.simple._DisableFirstRenderCameraReset()
    
    # create a new 'CSV Reader'
    payload_surfcsv = CSVReader(
        FileName=['./3d_surf_data/surface_data_'+str(i)+'.csv'])
    #payload_surfcsv = CSVReader(FileName=['/mnt/external_data/maruthi/payload/to_surf_data.csv'])
    #payload_surfcsv = CSVReader(FileName=['/mnt/external_data/maruthi/payload/payload_surf.csv'])
    
    print("read data")
    # Properties modified on payload_surfcsv
    payload_surfcsv.HaveHeaders = 0
    payload_surfcsv.FieldDelimiterCharacters = '" "'
    
    # create a new 'Table To Points'
    tableToPoints1 = TableToPoints(Input=payload_surfcsv)
    
    # Properties modified on tableToPoints1
    tableToPoints1.XColumn = 'Field 0'
    tableToPoints1.YColumn = 'Field 1'
    tableToPoints1.ZColumn = 'Field 2'
    
    # set active source
    # SetActiveSource(tableToPoints1)
    
    # create a new 'Transform'
    transform1 = Transform(Input=tableToPoints1)
    
    # Properties modified on transform1.Transform
    transform1.Transform.Rotate = [0.0, 0.0, 4.0]
    print("done transformation")
    
    # create a new 'Clip'
    clip1 = Clip(Input=transform1)
    clip1.ClipType = 'Box'
    # Properties modified on clip1.ClipType
    clip1.ClipType.Position = [-1.696043450844211, -54.8910389148131, -0.33203125]
    clip1.ClipType.Length = [471.2158891012069, 109.7879512755795, 0.33203125]
    
    #print("position", clip1.ClipType.Position)
    #clip1.ClipType.Position[2] = -0.33203125
    #clip1.ClipType.Length[2] = 0.33203125
    
    # create a new 'Clip'
    clip2 = Clip(Input=clip1)
    # Properties modified on clip2.ClipType
    clip2.ClipType.Normal = [0.0, -1.0, 0.0]
    print("clip2 done")
    
    # save data
    # SaveData('/mnt/external_data/maruthi/payload/clipped_surf_data_hello.csv',
    #  proxy=clip2, PointDataArrays=['Field 3', 'Field 4'])
    SaveData('clipped_data/clipped_surf_data_'+str(i)+'.csv',
             proxy=clip2)