code: def _update(self):
      # XXX The variance formulas should never produce a negative value,
      # but due to reasons I don't understand, both of our pens do.
      # So we take the absolute value here.
      self.varianceX = abs(self.varianceX)
      self.varianceY = abs(self.varianceY)
  
      self.stddevX = stddevX = sqrt(self.varianceX)
      self.stddevY = stddevY = sqrt(self.varianceY)
  
      # Correlation(X,Y) = Covariance(X,Y) / ( stddev(X) * stddev(Y) )
      # https://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient
      if stddevX * stddevY == 0:
          correlation = float("NaN")
      else:
          # XXX The above formula should never produce a value outside
          # the range [-1, 1], but due to reasons I don't understand,
          # (probably the same issue as above), it does. So we clamp.
          correlation = self.covariance / (stddevX * stddevY)
          correlation = max(-1, min(1, correlation))
      self.correlation = correlation if abs(correlation) > 1e-3 else 0
  
      slant = (
          self.covariance / self.varianceY
          if self.varianceY != 0
          else float("NaN")
      )
      self.slant = slant if abs(slant) > 1e-3 else 0
  
imports: from math import sqrt, degrees, atan
  from fontTools.pens.basePen import BasePen, OpenContourError
  from fontTools.pens.momentsPen import MomentsPen
label_desc: Use image node_id 3 for calling the StatisticsBase obj's underlying member method code with example usage: obj._update() without return types