Dynamic number of outputs for reader

I have a cloth simulator and I am writing the output of the simulations in an HDF5 container. My simulations may contain a positive number of certain objects. For example, it may contain between N buttons.

I am creating a reader for paraview to load our simulation results. However, I am not sure how to set the number of objects that the reader outputs, as different simulations may have different number of buttons.

Is it possible to read a dynamic value of vtkUnstructuredGrids using a single custom python reader?