code: def test_nan():
      df = pd.DataFrame(
          {
              "ts": pd.date_range(
                  start="2020-01-01", periods=366, freq="D"
              ),
              "y": np.random.randn(366),
          }
      )
      df.iloc[5:10, 1] = np.nan
      cd = ChangepointDetector()
      cd.find_trend_changepoints(df=df, time_col="ts", value_col="y")
      cd.find_seasonality_changepoints(
          df=df, time_col="ts", value_col="y"
      )
  
imports: from datetime import timedelta
  import numpy
  import pandas
  import pytest
  from pandas.tseries.frequencies import to_offset
  from sklearn.base import RegressorMixin
  from testfixtures import LogCapture
  from greykite.algo.changepoint.adalasso.changepoint_detector import ChangepointDetector
  from greykite.algo.changepoint.adalasso.changepoint_detector import get_changepoints_dict
  from greykite.algo.changepoint.adalasso.changepoint_detector import get_seasonality_changepoints
  from greykite.algo.changepoint.shift_detection.shift_detector import ShiftDetection
  from greykite.common.data_loader import DataLoader
  from greykite.common.logging import LOGGER_NAME
  from greykite.common.testing_utils import generate_df_for_tests
  from greykite.common.testing_utils import generate_df_with_arbitrary_trends_and_shifts
  from greykite.common.testing_utils import generate_test_changepoint_df
label_desc: Use image node_id 9 for calling a global function with example usage: test_nan() without return types