code: def test_timeseries_feature(enc_encoder):
      # synthetic time series tensor
      timeseries_tensor = torch.randn(
          [BATCH_SIZE, SEQ_SIZE], dtype=torch.float32
      )
  
      # generate feature config
      timeseries_feature_config = timeseries_feature(
          encoder={
              "type": enc_encoder,
              "max_len": SEQ_SIZE,
              "fc_layers": [{"output_size": DEFAULT_OUTPUT_SIZE}],
              # simulated parameters determined by pre-processing
              "max_sequence_length": SEQ_SIZE,
          }
      )
  
      # instantiate input feature object
      timeseries_feature_config, _ = load_config_with_kwargs(
          TimeseriesInputFeatureConfig, timeseries_feature_config
      )
      timeseries_input_feature = TimeseriesInputFeature(
          timeseries_feature_config
      )
  
      # pass synthetic tensor through input feature
      encoder_output = timeseries_input_feature(timeseries_tensor)
  
      # confirm correctness of the encoder output
      assert isinstance(encoder_output, dict)
      assert ENCODER_OUTPUT in encoder_output
      assert isinstance(encoder_output[ENCODER_OUTPUT], torch.Tensor)
      if enc_encoder == "passthrough":
          assert encoder_output[ENCODER_OUTPUT].shape == (
              BATCH_SIZE,
              SEQ_SIZE,
              1,
          )
      else:
          assert encoder_output[ENCODER_OUTPUT].shape == (
              BATCH_SIZE,
              DEFAULT_OUTPUT_SIZE,
          )
  
file_path: ludwig/tests/integration_tests/test_timeseries_feature.py
imports: import numpy
  import pandas
  import pytest
  import torch
  from ludwig.api import LudwigModel
  from ludwig.constants import COLUMN, ENCODER_OUTPUT, INPUT_FEATURES, OUTPUT_FEATURES
  from ludwig.features.timeseries_feature import TimeseriesInputFeature
  from ludwig.schema.features.timeseries_feature import TimeseriesInputFeatureConfig
  from ludwig.schema.utils import load_config_with_kwargs
  from tests.integration_tests.utils import number_feature, timeseries_feature
label_desc: Use image node_id 1 for calling a global function with example usage: test_timeseries_feature(enc_encoder) without return types