code: def test_nans(self):
      with pytest.raises(ValueError):
          series1 = _series_from_values([np.nan, 0, 1, 2, 3])
          series2 = _series_from_values([0, 1, 2, 3, 4])
  
          dtw.dtw(series1, series2)
  
imports: import matplotlib.pyplot
  import numpy
  import pandas
  import pytest
  from darts.dataprocessing import dtw
  from darts.metrics import dtw_metric, mae, mape
  from darts.timeseries import TimeSeries
  from darts.utils import timeseries_generation
label_desc: Use image node_id 7 for calling the TestDynamicTimeWarping obj's underlying member method code with example usage: obj.test_nans() without return types