class_docstr: This class implements the calculation of crowding distance for NSGA-II.
code: def sort(
      self, candidates: tp.List[p.Parameter], in_place: bool = True
  ) -> tp.List[p.Parameter]:
      if in_place:
          candidates.sort(
              key=lambda elem: elem._meta["crowding_distance"],
              reverse=True,
          )  # Larger -> Less crowded
      return sorted(
          candidates,
          key=lambda elem: elem._meta["crowding_distance"],
          reverse=True,
      )
  
file_path: nevergrad/nevergrad/optimization/multiobjective/nsga2.py
imports: import logging
  import numpy
  import nevergrad.common.typing
  from nevergrad.parametrization import parameter
label_desc: Use image node_id 3 for calling the CrowdingDistance obj's underlying member method code with example usage: obj.sort(candidates, in_place) and returns: sorted