docstr: Test time series de-duplication procedures 
docstr_tok: ["Test","time","series","de-duplication","procedures"]
code: def test_9_ts_dedupe(self):
      """Test time series de-duplication procedures"""
      data = pd.read_csv("tests/data/arrivals.csv")
      data = data[data["Country"].isin(["US", "Japan"])]
      target_len = len(data)
      data = pd.concat(
          [data, data[data["Country"] == "Japan"]], ignore_index=True
      )  # force duplication of one series
      jai = json_ai_from_problem(
          data,
          ProblemDefinition.from_dict(
              {
                  "target": "Traffic",
                  "time_aim": 30,
                  "timeseries_settings": {
                      "group_by": ["Country"],
                      "horizon": 8,
                      "order_by": "T",
                      "window": 4,
                  },
              }
          ),
      )
      code = code_from_json_ai(jai)
      pred = predictor_from_code(code)
      transformed = pred.preprocess(data)
      assert len(transformed) == target_len
  
imports: import random
  from datetime import datetime
  from datetime import timedelta
  import unittest
  import numpy
  import pandas
  from typing import List
  from scipy import signal
  from sklearn.metrics import r2_score
  from lightwood.api.types import ProblemDefinition
  from tests.utils.timing import train_and_check_time_aim
  from sktime.forecasting.base import ForecastingHorizon
  from sktime.forecasting.statsforecast import StatsForecastAutoARIMA
  from dataprep_ml.splitters import stratify
  from lightwood.api.high_level import json_ai_from_problem, code_from_json_ai, predictor_from_code, predictor_from_problem, predictor_from_json_ai
  from lightwood.mixer.sktime import SkTime
label_desc: Use image node_id 13 for calling the TestTimeseries obj's underlying member method code with example usage: obj.test_9_ts_dedupe() without return types