code: def train_test_split(
      ts_data: pd.DataFrame, n_test_rows: int
  ) -> pd.DataFrame:
      train = ts_data.head(ts_data.shape[0] - n_test_rows)
      test = ts_data.tail(n_test_rows)
      return train.reset_index(), test.reset_index()
  
imports: import numpy
  import pandas
  import pytest
  from prophet import Prophet
  from prophet.utilities import warm_start_params
label_desc: Use image node_id 1 for calling a global function with example usage: train_test_split(ts_data, n_test_rows) and returns: train,  test