code: def test_encode_features(self):
      Xenc, enc_map = encode_features(STOCKS_CAT)
      expected = np.array(
          [
              [3, 2],
              [2, 2],
              [3, 2],
              [3, 2],
              [1, 2],
              [1, 2],
              [4, 0],
              [0, 2],
              [0, 2],
              [4, 2],
              [3, 2],
              [2, 1],
          ]
      )
      assert_array_equal(Xenc, expected)
      self.assertEqual(
          enc_map,
          [
              {"cons": 0, "fin": 1, "nrg": 2, "tech": 3, "tel": 4},
              {"CN": 0, "NL": 1, "USA": 2},
          ],
      )
  
file_path: kmodes/kmodes/util/tests/test_util.py
imports: import unittest
  import numpy
  from sklearn.utils._testing import assert_array_equal
  from kmodes.util import get_max_value_key, encode_features, get_unique_rows, decode_centroids
label_desc: Use image node_id 2 for calling the TestUtils obj's underlying member method code with example usage: obj.test_encode_features() without return types