How to get full cell types array with new VTK 9.6 API

GetCellTypesArray is recently deprecated. Using the latest python dev wheels:

>>> import vtk
>>> grid = vtk.vtkUnstructuredGrid()
>>> array = grid.GetCellTypesArray()
DeprecationWarning: Call to deprecated method GetCellTypesArray. (Use GetCellTypes() instead) -- Deprecated since version 9.6.0.

As per the warning, let’s try GetCellTypes instead:

>>> cell_types = vtk.vtkCellTypes()
>>> grid.GetCellTypes(cell_types)
DeprecationWarning: Call to deprecated method GetCellTypes. (Use GetDistinctCellTypes(vtkCellTypes* types) instead.) -- Deprecated since version 9.6.0.

As per the warning, this means I should now use GetDistinctCellTypes.
But, this returns an array with unique cell types, rather than an array with all cell types.
Am I missing something? How can I use the new, non-deprecated API to get the original array that was returned by GetCellTypesArray? Or is it no longer possible to do this in VTK 9.6?