code: def test_encode_and_decode(self):
      data = pd.Series([1, 1.1, 2, -8.6, None, 0])
  
      encoder = NumericEncoder()
      encoder.prepare(data)
      encoded_vals = encoder.encode(data)
  
      # sign component check
      self.assertTrue(encoded_vals[0][0] > 0)
      self.assertTrue(encoded_vals[1][0] > 0)
      self.assertTrue(encoded_vals[2][0] > 0)
      self.assertTrue(encoded_vals[3][0] == 0)
  
      # none component check
      for i in range(0, len(encoded_vals)):
          if i != 4:
              self.assertTrue(encoded_vals[i][-1] == 0)
          else:
              self.assertTrue(encoded_vals[i][-1] == 1)
  
      # exp component nan edge case check
      self.assertTrue(encoded_vals[4][2] == 0)
  
      # compare decoded v/s real
      decoded_vals = encoder.decode(encoded_vals)
      for decoded, real in zip(decoded_vals, data.tolist()):
          if decoded is None:
              self.assertTrue((real is None) or (real != real))
          else:
              np.testing.assert_almost_equal(
                  round(decoded, 6), round(real, 6)
              )
  
file_path: lightwood/tests/unit_tests/encoder/numeric/test_numeric.py
imports: import unittest
  import numpy
  import pandas
  import torch
  from lightwood.encoder.numeric import NumericEncoder
  from lightwood.encoder.numeric import TsNumericEncoder
  from lightwood.helpers.general import is_none
label_desc: Use image node_id 1 for calling the TestNumericEncoder obj's underlying member method code with example usage: obj.test_encode_and_decode() without return types