code: def pure_diversity(solution: npt.NDArray[np.float32]) -> float:
      """
      Computes the pure diversity of the solutions as described in "Diversity
      Assessment in Many-Objective Optimization" (Wang et al., 2017).
  
      Args:
          solution: Array of shape [N, D] (N: number of points, D: dimensionality) containing the
              points of the solution set.
  
      Returns:
          The modified maximum spread of the solution.
      """
      distances = spt.distance_matrix(solution, solution, p=2)
      np.fill_diagonal(distances, float("inf"))
  
      return _compute_pd(distances)
  
file_path: gluonts/src/gluonts/nursery/tsbench/src/tsbench/analysis/utils/mo_metrics.py
imports: from typing import Tuple
  import numpy
  import numpy.typing
  import pygmo
  import scipy.spatial
label_desc: Use image node_id 3 for calling a global function with example usage: pure_diversity(solution) and returns: _compute_pd