code: def test_ts(self, mock_handler):
      # TS
      df2 = pd.DataFrame(
          pd.date_range(start="1/1/2018", end="1/31/2018"),
          columns=["t"],
      )
      df3 = df2.copy()
  
      df2["a"] = "a"
      df2["x"] = range(1, 32)
  
      df3["a"] = "b"
      df3["x"] = range(11, 42)
  
      df = pd.concat([df2, df3])
      self.set_handler(mock_handler, name="pg", tables={"df": df})
  
      # create project
      self.run_sql("create database proj")
  
      # TS predictor
      # create predictor
      self.run_sql(
          """
             create model proj.modelx
             from pg (select * from df)
             predict x
             order by t
             group by a
             window 5
             horizon 3
          """
      )
      self.wait_predictor("proj", "modelx")
  
      # run predict
      ret = self.run_sql(
          """
             SELECT p.*
             FROM pg.df as t 
             JOIN proj.modelx as p
             where t.a='b' and t.t > latest
          """
      )
      # LW can predict
      assert list(round(ret.x)) == [42, 43, 44]
  
file_path: mindsdb/tests/unit/ml_handlers/test_lightwood.py
imports: import time
  from unittest.mock import patch
  import pandas
  from mindsdb_sql import parse_sql
  from tests.unit.executor_test_base import BaseExecutorTest
label_desc: Use image node_id 4 for calling the TestLW obj's underlying member method code with example usage: obj.test_ts(mock_handler) without return types