class_docstr: Test methods common to Public and Private data interfaces modules.
docstr: Tests if correct indexes of features are returned. Should work even when feature names are starting with common names.
  
  TODO: also make it work for private_data_interface
code: def test_features_to_vary(self):
      """
      Tests if correct indexes of features are returned. Should work even when feature names are starting with common names.
  
      TODO: also make it work for private_data_interface
      """
      res = []
      d = self.d[0]
      temp_ohe_data = d.get_ohe_min_max_normalized_data(
          d.data_df.iloc[[0]]
      )
      d.create_ohe_params(temp_ohe_data)
      # d.create_ohe_params()
      # d.categorical_feature_names = ['cat1', 'cat2']
      # d.encoded_feature_names = ['cat2_cont1', 'cont2', 'cat1_val1', 'cat1_val2', 'cat2_val1', 'cat2_val2']
      # d.continuous_feature_names = ['cat2_cont1', 'cont2']
      res.append(
          d.get_indexes_of_features_to_vary(
              features_to_vary=["workclass"]
          )
      )
      # 4,5 are correct indexes of features that can be varied and the data object's method should not return
      # the first continuous feature that starts with the same name.
      assert [2, 3, 4, 5] == res[0]
  
file_path: DiCE/tests/test_data.py
imports: import pytest
  import dice_ml
label_desc: Use image node_id 5 for calling the TestCommonDataMethods obj's underlying member method code with example usage: obj.test_features_to_vary() without return types