code: def test_raise_encode_type(self):
      data = [1, 2, 3]
      enc = DatetimeEncoder()
      enc.prepare([])
      self.assertRaises(Exception, enc.encode, data)
  
file_path: lightwood/tests/unit_tests/encoder/date/test_datetime.py
imports: import unittest
  from datetime import datetime
  import numpy
  import pandas
  import torch
  from lightwood.encoder.datetime.datetime import DatetimeEncoder
  from lightwood.encoder.datetime.datetime_sin_normalizer import DatetimeNormalizerEncoder
label_desc: Use image node_id 2 for calling the TestDatetimeEncoder obj's underlying member method code with example usage: obj.test_raise_encode_type() without return types