docstr: Test cases for both `PastCyclicEncoder` and `FutureCyclicEncoder`
docstr_tok: ["Test","cases","for","both","`","PastCyclicEncoder","`","and","`","FutureCyclicEncoder","`"]
code: def helper_test_cyclic_encoder(
      self,
      encoder_class,
      attribute,
      inf_ts_short,
      inf_ts_long,
      cyclic,
      expected_components,
  ):
      """Test cases for both `PastCyclicEncoder` and `FutureCyclicEncoder`"""
      encoder = encoder_class(
          input_chunk_length=self.input_chunk_length,
          output_chunk_length=self.output_chunk_length,
          attribute=attribute,
      )
      # covs: covariates; ds: dataset
      # expected generated covs when covs are supplied as input for train and inference ds
      result_with_cov = [
          tg.datetime_attribute_timeseries(
              ts,
              attribute=attribute,
              cyclic=cyclic,
              with_columns=expected_components,
          )
          for ts in self.covariates_multi
      ]
      # expected generated covs when covs are not supplied as input for train ds
      result_no_cov = [
          tg.datetime_attribute_timeseries(
              ts,
              attribute=attribute,
              cyclic=cyclic,
              with_columns=expected_components,
          )
          for ts in self.target_multi
      ]
      # expected generated covs when covs are not supplied as input for inference ds and n <= output_chunk_length
      result_no_cov_inf_short = [
          tg.datetime_attribute_timeseries(
              ts,
              attribute=attribute,
              cyclic=cyclic,
              with_columns=expected_components,
          )
          for ts in inf_ts_short
      ]
      # expected generated covs when covs are not supplied as input for inference ds and n > output_chunk_length
      result_no_cov_inf_long = [
          tg.datetime_attribute_timeseries(
              ts,
              attribute=attribute,
              cyclic=cyclic,
              with_columns=expected_components,
          )
          for ts in inf_ts_long
      ]
  
      # test train encoding with covariates
      self.helper_test_encoder_single_train(
          encoder=encoder,
          target=self.target_multi,
          covariates=self.covariates_multi,
          result=result_with_cov,
          merge_covariates=False,
      )
  
      # test train encoding without covariates
      self.helper_test_encoder_single_train(
          encoder=encoder,
          target=self.target_multi,
          covariates=[None] * len(self.target_multi),
          result=result_no_cov,
          merge_covariates=False,
      )
      # test inference encoding with covariates and n <= output_chunk_length
      self.helper_test_encoder_single_inference(
          encoder=encoder,
          n=self.n_short,
          target=self.target_multi,
          covariates=self.covariates_multi,
          result=result_with_cov,
          merge_covariates=False,
      )
      # test inference encoding with covariates and n > output_chunk_length
      self.helper_test_encoder_single_inference(
          encoder=encoder,
          n=self.n_long,
          target=self.target_multi,
          covariates=self.covariates_multi,
          result=result_with_cov,
          merge_covariates=False,
      )
      # test inference encoding without covariates and n <= output_chunk_length
      self.helper_test_encoder_single_inference(
          encoder=encoder,
          n=self.n_short,
          target=self.target_multi,
          covariates=[None] * len(self.target_multi),
          result=result_no_cov_inf_short,
          merge_covariates=False,
      )
      # test inference encoding without covariates and n > output_chunk_length
      self.helper_test_encoder_single_inference(
          encoder=encoder,
          n=self.n_long,
          target=self.target_multi,
          covariates=[None] * len(self.target_multi),
          result=result_no_cov_inf_long,
          merge_covariates=False,
      )
  
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 14 for calling the TestEncoder obj's underlying member method code with example usage: obj.helper_test_cyclic_encoder(encoder_class, attribute, inf_ts_short, inf_ts_long, cyclic, expected_components) without return types