code: def interpolate_signal_if_needed(self, iInputDS, iSignal):
      if not self.has_missing_data(iInputDS[iSignal]):
          return iInputDS[iSignal]
      lSignal = iInputDS[iSignal].interpolate(
          method="linear", limit_direction="both", axis=0
      )
      lSignal = lSignal.astype(np.dtype(iInputDS[iSignal]))
      return lSignal
  
file_path: atspy/atspy/TS/MissingData.py
imports: import pandas
  import numpy
  import datetime
label_desc: Use image node_id 4 for calling the cMissingDataImputer obj's underlying member method code with example usage: obj.interpolate_signal_if_needed(iInputDS, iSignal) and returns: lSignal, iInputDS