docstr: Test `SequentialEncoder.encode_train()` output
docstr_tok: ["Test","`","SequentialEncoder.encode_train","(",")","`","output"]
code: def test_encoder_sequence_train(self):
      """Test `SequentialEncoder.encode_train()` output"""
      # ====> Sequential Cyclic Encoder Tests <====
      encoder_args = {
          "cyclic": {"past": ["month"], "future": ["month", "month"]}
      }
      encoders = self.helper_encoder_from_model(
          add_encoder_dict=encoder_args
      )
  
      # ==> test training <==
      past_covs_train, future_covs_train = encoders.encode_train(
          target=self.target_multi,
          past_covariates=self.covariates_multi,
          future_covariates=self.covariates_multi,
      )
  
      # encoded multi TS covariates should have same number as input covariates
      assert len(past_covs_train) == 2
      assert len(future_covs_train) == 2
  
      # each attribute (i.e., 'month', ...) generates 2 output variables (+ 1 covariates from input covariates)
      assert past_covs_train[0].n_components == 3
      assert future_covs_train[0].n_components == 5
  
      # check with different inputs
      encoder_args = {
          "cyclic": {"past": ["month"], "future": ["month"]}
      }
      encoders = self.helper_encoder_from_model(
          add_encoder_dict=encoder_args
      )
  
      # ==> test training <==
      past_covs_train, future_covs_train = encoders.encode_train(
          target=self.target_multi,
          past_covariates=self.covariates_multi,
          future_covariates=self.covariates_multi,
      )
  
      # encoded multi TS covariates should have same number as input covariates
      assert len(past_covs_train) == 2
      assert len(future_covs_train) == 2
  
      # each attribute (i.e., 'month', ...) generates 2 output variables (+ 1 covariates from input covariates)
      assert past_covs_train[0].n_components == 3
      assert future_covs_train[0].n_components == 3
  
      # encoded past covariates must have equal index as input past covariates
      for pc, pc_in in zip(past_covs_train, self.covariates_multi):
          assert pc.time_index.equals(pc_in.time_index)
  
      # encoded future covariates must have equal index as input future covariates
      for fc, fc_in in zip(future_covs_train, self.covariates_multi):
          assert fc.time_index.equals(fc_in.time_index)
  
      # for training dataset: both encoded past and future covariates with cyclic encoder 'month' should be equal
      # (apart from component names)
      for pc, fc in zip(past_covs_train, future_covs_train):
          assert pc.with_columns_renamed(
              list(pc.components),
              [f"comp{i}" for i in range(len(pc.components))],
          ) == fc.with_columns_renamed(
              list(fc.components),
              [f"comp{i}" for i in range(len(fc.components))],
          )
  
imports: import copy
  from typing import Optional, Sequence
  import numpy
  import pandas
  import pytest
  from darts import TimeSeries
  from darts.dataprocessing.encoders import FutureCallableIndexEncoder, FutureCyclicEncoder, FutureDatetimeAttributeEncoder, FutureIntegerIndexEncoder, PastCallableIndexEncoder, PastCyclicEncoder, PastDatetimeAttributeEncoder, PastIntegerIndexEncoder, SequentialEncoder
  from darts.dataprocessing.encoders.encoder_base import PastCovariatesIndexGenerator, SingleEncoder
  from darts.dataprocessing.encoders.encoders import CallableIndexEncoder, CyclicTemporalEncoder, DatetimeAttributeEncoder, IntegerIndexEncoder
  from darts.dataprocessing.transformers import Scaler
  from darts.logging import get_logger, raise_log
  from darts.utils import timeseries_generation
label_desc: Use image node_id 2 for calling the TestEncoder obj's underlying member method code with example usage: obj.test_encoder_sequence_train() without return types