Storing Time-dependent PartitionedDataSetCollection

I am writing a data format that is made of a vtkPartitionedDataSetCollection containing multiple vtkUnstructuredGrids. This data is time dependent, such that a PartitionedDataSetCollection can be generated for each time step. I currently do something along the following lines:

times = [0,1,2,3,4,5]

for time in times:
    # Returns a vtkPartitionedDataSetCollection
    collection = get_collection(data, time=time)
    writer = vtkXMLPartitionedDataSetCollectionWriter()
    writer.SetInputData(collection)
    output_file = f"test_{time}.vtpc"
    writer.SetFileName(output_file)
    writer.Write()

This creates a separate file for each time step which is not optimal. How can I go about storing this time dependent data? Do I need to use the VTKHDF format to achieve this? Thanks!