code: def _timeseries_component(self, series):
          
          # this is only called if the set_component function recognizes a pandas series
          # Todo: raise a warning if extrapolating from the end of the series.
          return lambda: np.interp(self.time(), series.index, series.values)
docs: Internal function for creating a timeseries model element