code: def fit(self):
      assert self.mTimeInfo.isPhysicalTime()
      lHor = self.mTimeInfo.mHorizon
      self.mTime = self.mTimeInfo.mTime
      self.mSignal = self.mTimeInfo.mSignal
      self.mTimeInfo.addVars(self.mCycleFrame)
      lName = self.getCycleName()
      self.mCycleFrame[self.mTrend_residue_name] = self.mTrendFrame[
          self.mTrend_residue_name
      ]
      self.mCycleFrame[lName] = self.mTrendFrame[self.mTime].apply(
          self.get_date_part
      )
      # we encode only using estimation
      lCycleFrameEstim = self.mSplit.getEstimPart(self.mCycleFrame)
      lTrendMeanEstim = lCycleFrameEstim[
          self.mTrend_residue_name
      ].mean()
      lGroupBy = lCycleFrameEstim.groupby(by=[lName], sort=False)[
          self.mTrend_residue_name
      ].mean()
      self.mEncodedValueDict = lGroupBy.to_dict()
      self.mDefaultValue = lTrendMeanEstim
      # print("cSeasonalPeriodic_DefaultValue" , self.getCycleName(), self.mDefaultValue);
  
      self.mCycleFrame[lName + "_enc"] = self.mCycleFrame[lName].apply(
          lambda x: self.mEncodedValueDict.get(x, self.mDefaultValue)
      )
      self.mCycleFrame[lName + "_enc"].fillna(
          lTrendMeanEstim, inplace=True
      )
      self.mCycleFrame[self.getCycleResidueName()] = (
          self.mCycleFrame[self.mTrend_residue_name]
          - self.mCycleFrame[lName + "_enc"]
      )
      self.mCycleFrame[lName + "_NotEncoded"] = self.mCycleFrame[lName]
      self.mCycleFrame[lName] = self.mCycleFrame[lName + "_enc"]
  
      self.mOutName = self.getCycleName()
  
imports: import pandas
  import numpy
  from .None import Time
  from .None import Perf
  from .None import Plots
  from .None import Utils
  import time
label_desc: Use image node_id 4 for calling the cSeasonalPeriodic obj's underlying member method code with example usage: obj.fit() without return types