code: def test_features_to_vary(
      self,
      desired_class,
      desired_range,
      sample_custom_query_2,
      total_CFs,
      features_to_vary,
      permitted_range,
  ):
      features_to_vary = self.exp.setup(
          features_to_vary, None, sample_custom_query_2, "inverse_mad"
      )
      ans = self.exp._generate_counterfactuals(
          query_instance=sample_custom_query_2,
          features_to_vary=features_to_vary,
          total_CFs=total_CFs,
          desired_class=desired_class,
          desired_range=desired_range,
          permitted_range=permitted_range,
      )
  
      for feature in self.exp.data_interface.feature_names:
          if feature not in features_to_vary:
              assert all(
                  ans.final_cfs_df[feature].values[i]
                  == sample_custom_query_2[feature].values[0]
                  for i in range(total_CFs)
              )
  
imports: import pytest
  from raiutils.exceptions import UserConfigValidationException
  from dice_ml.counterfactual_explanations import CounterfactualExplanations
  from dice_ml.diverse_counterfactuals import CounterfactualExamples
label_desc: Use image node_id 5 for calling the TestDiceRandomBinaryClassificationMethods obj's underlying member method code with example usage: obj.test_features_to_vary(desired_class, desired_range, sample_custom_query_2, total_CFs, features_to_vary, permitted_range) without return types