docstr: :param data: # @TODO: receive a consistent data type here; currently either list of lists or pd.Series w/lists
  :return: encoded data
docstr_tok: [":","param","data",":","#","@","TODO",":","receive","a","consistent","data","type","here",";","currently","either","list","of","lists","or","pd.Series","w\/lists",":","return",":","encoded","data"]
code: def encode(self, data):
      """
      :param data: # @TODO: receive a consistent data type here; currently either list of lists or pd.Series w/lists
      :return: encoded data
      """
      if not self.is_prepared:
          raise Exception(
              'You need to call "prepare" before calling "encode" or "decode".'
          )
  
      if isinstance(data, pd.Series):
          data = data.values
      if not isinstance(data[0], Iterable):
          data = [data]
  
      ret = [self.encode_one(row) for row in data]
  
      return torch.Tensor(ret)
  
file_path: lightwood/lightwood/encoder/datetime/datetime_sin_normalizer.py
imports: import datetime
  import calendar
  import numpy
  import pandas
  import torch
  from lightwood.encoder.base import BaseEncoder
  from collections.abc import Iterable
  from lightwood.helpers.general import is_none
label_desc: Use image node_id 3 for calling the DatetimeNormalizerEncoder obj's underlying member method code with example usage: obj.encode(data) and returns: torch