code: def fit(self, x, y):
      assert len(x) == len(y)
  
      p0 = [
          max(y),
          np.median(x),
          1,
          min(y),
      ]  # this is an mandatory initial guess
  
      self.popt, pcov = curve_fit(
          sigmoid, x, y, p0, method="dogbox", maxfev=10000
      )
      return self
  
file_path: scattertext/scattertext/smoothing/sigmoidal.py
imports: import numpy
  from scipy.optimize import curve_fit
label_desc: Use image node_id 2 for calling the Sigmoidal obj's underlying member method code with example usage: obj.fit(x, y) and returns: self