code: def fit(self, X):
          
  
          self.constant_value = self._get_constant_value(X)
  
          if self.constant_value is None:
              self.model = scipy.stats.gaussian_kde(X)
  
          else:
              self._replace_constant_methods()
  
          self.fitted = True
docs: Fit Kernel density estimation to an list of values.
  
          Args:
              X: 1-d `np.ndarray` or `pd.Series` or `list` datapoints to be estimated from.
  
          This function will fit a gaussian_kde model to a list of datapoints
          and store it as a class attribute.