code: def testComponentMean(self):
      self.dlm5._forwardFilter(start=0, end=99, renew=False)
      self.dlm5.result.filteredSteps = [0, 99]
      # for component with forward filter
      arTrend = self.dlm5._getComponentMean(
          filterType="forwardFilter", name="ar2", start=0, end=99
      )
      trueAr = [item[1, 0] for item in self.dlm5.result.filteredState]
      comp = self.dlm5.builder.automaticComponents["ar2"]
      for i in range(len(trueAr)):
          comp.updateEvaluation(i, self.data5)
          trueAr[i] = comp.evaluation * trueAr[i]
  
      diff = 0.0
      for i in range(len(arTrend)):
          diff += abs(arTrend[i] - trueAr[i])
      self.assertAlmostEqual(diff, 0)
  
      # for component with backward smoother
      self.dlm5._backwardSmoother(start=99)
      self.dlm5.result.smoothedSteps = [0, 99]
      arTrend = self.dlm5._getComponentMean(
          filterType="backwardSmoother", name="ar2", start=0, end=99
      )
      trueAr = [item[1, 0] for item in self.dlm5.result.smoothedState]
      comp = self.dlm5.builder.automaticComponents["ar2"]
      for i in range(len(trueAr)):
          comp.updateEvaluation(i, self.data5)
          trueAr[i] = comp.evaluation * trueAr[i]
  
      diff = 0.0
      for i in range(len(arTrend)):
          diff += abs(arTrend[i] - trueAr[i])
      self.assertAlmostEqual(diff, 0)
  
file_path: pydlm/tests/access/test_dlmGet.py
imports: import unittest
  from pydlm.modeler.trends import trend
  from pydlm.modeler.autoReg import autoReg
  from pydlm.access._dlmGet import _dlmGet
label_desc: Use image node_id 4 for calling the test_dlmGet obj's underlying member method code with example usage: obj.testComponentMean() without return types