docstr: Encodes time series data.
  
  :param column_data: Input column data to be encoded
  :returns: a torch tensor representing the encoded time series.
code: def encode(self, column_data: Iterable[Iterable]) -> torch.Tensor:
      """
      Encodes time series data.
  
      :param column_data: Input column data to be encoded
      :returns: a torch tensor representing the encoded time series.
      """
  
      if not self.is_prepared:
          raise Exception(
              'You need to call "prepare" before calling "encode" or "decode".'
          )
  
      base_encode = super().encode(column_data)
  
      if self.original_type in (
          dtype.integer,
          dtype.float,
          dtype.quantity,
          dtype.num_tsarray,
      ):
          mavgs = []
          for offset in range(self.max_mavg_offset):
              ma = torch.mean(
                  base_encode[:, offset : self.max_mavg_offset], 1
              )
              mavgs.append(ma.unsqueeze(1))
          base_encode[
              :, (self.output_size - self.max_mavg_offset) :
          ] = torch.cat(mavgs, dim=1)
  
      return base_encode
  
file_path: lightwood/lightwood/encoder/time_series/ts.py
imports: from typing import List, Iterable
  import torch
  from type_infer.dtype import dtype
  from lightwood.encoder.array import ArrayEncoder
label_desc: Use image node_id 2 for calling the TimeSeriesEncoder obj's underlying member method code with example usage: obj.encode(column_data) and returns: base_encode