code: def ripley_poisson_difference(self, points):
      try:
          from astropy.stats import RipleysKEstimator
      except:
          raise Exception("Please install astropy")
  
      r = np.linspace(self.min_radius, self.max_radius, 100)
      ripley = RipleysKEstimator(
          area=1.0, x_max=1.0, y_max=1.0, x_min=0.0, y_min=0.0
      )
  
      return np.sum(
          np.abs(ripley(points, r, mode="ripley") - ripley.poisson(r))
      )
  
file_path: scattertext/scattertext/categoryprojector/OptimalProjection.py
imports: from typing import Optional, Callable
  import numpy
  from sklearn.decomposition import PCA
  from scattertext.Scalers import stretch_0_to_1
  from scattertext.termscoring.RankDifference import RankDifference
  from scattertext.categoryprojector.CategoryProjector import CategoryProjector
  from scattertext.termcompaction.AssociationCompactor import AssociationCompactor, AssociationCompactorByRank, TermCategoryRanker
label_desc: Use image node_id 2 for calling the ProjectionQuality obj's underlying member method code with example usage: obj.ripley_poisson_difference(points) and returns: np