code: def test_permitted_range_categorical(
      self,
      desired_class,
      sample_custom_query_2,
      total_CFs,
      permitted_range,
  ):
      self.exp._generate_counterfactuals(
          query_instance=sample_custom_query_2,
          desired_class=desired_class,
          total_CFs=total_CFs,
          permitted_range=permitted_range,
      )
      assert all(
          i in permitted_range["Categorical"]
          for i in self.exp.final_cfs_df.Categorical.values
      )
  
imports: import numpy
  import pytest
  from dice_ml.counterfactual_explanations import CounterfactualExplanations
  from dice_ml.diverse_counterfactuals import CounterfactualExamples
label_desc: Use image node_id 7 for calling the TestDiceKDBinaryClassificationMethods obj's underlying member method code with example usage: obj.test_permitted_range_categorical(desired_class, sample_custom_query_2, total_CFs, permitted_range) without return types