Crowding Distance

I would like to know how the CrowdingDistance property in the Pareto Sort component is calculated.

I originally thought that it was simple, as it is described in the NSGA-II paper and elsewhere.
eg
https://link.springer.com/chapter/10.1007/3-540-45356-3_83
and
https://arxiv.org/ftp/arxiv/papers/1811/1811.12667.pdf

However, when coding it up on a simple example, using either of the methods, I couldn't reproduce the values given by the Pareto Sort component.

As 2 out of the 3 external references in the help no longer work and the Wikipedia reference doesn't mention crowding distance.

Could you provide the reference where your implementation of crowding distance is taken from?

Thanks.