### Description The logic of CustomDist is getting pretty large. After #7239 I would refactor it into it's own file (and same for tests).