Division of multi block data set

Hello,
I am new for VTK. I have loaded one vtk file in paraview which have the multiblock data set in it and it have cells and faces in it (unstructured grid). I have filed data as will in it. I want to divide this cells and faces based on filed data i exported.
As an example cells have domain id in range [4,100] in cells and i exported field data domain id vs name i.e. domain id 4 has the name of inlet. now i want to divide cells based on domain id and give its name same as what is corresponding to filed data.
It is now:
image

I want something like:
image

i was using following script as a reference:

import vtk
inp = self.GetInputDataObject(0, 0)
out = self.GetOutput()

outData = vtk.vtkMultiBlockDataSet()

thresh = vtk.vtkThreshold()
thresh.SetInputData(inp)
thresh.SetInputArrayToProcess(0,0,0,vtk.vtkDataObject.FIELD_ASSOCIATION_CELLS,'RegionId')
rangeID = inputs[0].CellData.GetArray('RegionId').GetRange()

for ic in range(int(rangeID[0]), int(rangeID[1])):
    thresh.ThresholdBetween(ic-0.5,ic+0.5)
    thresh.Update()
    tooutData = thresh.GetOutputDataObject(0)
    outData.SetBlock(ic,tooutData)

out.DeepCopy(outData)

source of script: How to create a collection of blocks (multi block) based on connectivity - ParaView Support - ParaView