class_docstr: Test methods common to Public and Private data interfaces modules.
docstr: Tests if correct encoded categorical feature indexes are returned. Should work even when feature names
  are starting with common names.
  TODO also test for private data interface
code: def test_encoded_categorical_features(self):
      """
      Tests if correct encoded categorical feature indexes are returned. Should work even when feature names
      are starting with common names.
      TODO also test for private data interface
      """
      res = []
      d = self.d[0]
      # for d in self.d:
      #     d.categorical_feature_names = ['cat1', 'cat2']
      #     d.continuous_feature_names = ['cat2_cont1', 'cont2']
      #     d.encoded_feature_names = ['cat2_cont1', 'cont2', 'cat1_val1', 'cat1_val2', 'cat2_val1', 'cat2_val2']
      print(d.data_df)
      temp_ohe_data = d.get_ohe_min_max_normalized_data(
          d.data_df.iloc[[0]]
      )
      d.create_ohe_params(temp_ohe_data)
      res.append(d.get_encoded_categorical_feature_indexes())
      assert [2, 3, 4, 5] == res[0][0]  # there are 4 types of workclass
      assert len(res[0][1]) == 8  # eight types of education
      assert len(res[0][-1]) == 2
  
file_path: DiCE/tests/test_data.py
imports: import pytest
  import dice_ml
label_desc: Use image node_id 4 for calling the TestCommonDataMethods obj's underlying member method code with example usage: obj.test_encoded_categorical_features() without return types