code: def test_interpolate_time_raises_for_non_timeseries(self):
      # When method='time' is used on a non-TimeSeries that contains a null
      # value, a ValueError should be raised.
      non_ts = Series([0, 1, 2, np.nan])
      msg = "time-weighted interpolation only works on Series.* with a DatetimeIndex"
      with pytest.raises(ValueError, match=msg):
          non_ts.interpolate(method="time")
  
imports: import numpy
  import pytest
  import pandas.util._test_decorators
  import pandas
  from pandas import Index, MultiIndex, Series, date_range, isna
  import pandas._testing
label_desc: Use image node_id 3 for calling the TestSeriesInterpolateData obj's underlying member method code with example usage: obj.test_interpolate_time_raises_for_non_timeseries() without return types