class_docstr: Time series encoder. This module can learn features for any `order_by` temporal column, both with and without accompanying target data.
  
  The backbone of this encoder is either a recurrent neural network or a transformer; both structured in an encoder-decoder fashion.
class_docstr_tok: ["Time","series","encoder",".","This","module","can","learn","features","for","any","`","order_by","`","temporal","column",",","both","with","and","without","accompanying","target","data",".","The","backbone","of","this","encoder","is","either","a","recurrent","neural","network","or","a","transformer",";","both","structured","in","an","encoder-decoder","fashion","."]
code: def to(self, device, available_devices):
      if self._is_setup:
          self.device = device
          return super().to(device, available_devices)
      return self
  
imports: import time
  from math import gcd
  from typing import List
  from copy import deepcopy
  import numpy
  import pandas
  import torch
  import torch.nn
  from torch import optim
  from type_infer.dtype import dtype
  from lightwood.helpers.log import log
  from lightwood.encoder.base import BaseEncoder
  from lightwood.helpers.device import get_device_from_name
  from lightwood.helpers.torch import LightwoodAutocast
  from lightwood.encoder.datetime import DatetimeNormalizerEncoder
  from lightwood.encoder.time_series.helpers.rnn_helpers import EncoderRNNNumerical, DecoderRNNNumerical
  from lightwood.encoder.helpers import MinMaxNormalizer, CatNormalizer
  from lightwood.encoder.time_series.helpers.transformer_helpers import TransformerEncoder, get_chunk, len_to_mask
label_desc: Use image node_id 3 for calling the TimeSeriesEncoder obj's underlying member method code with example usage: obj.to(device, available_devices) and returns: self, super