code: def check_permitted_range(self, permitted_range):
      if permitted_range is not None:
          permitted_range_features = list(permitted_range)
          not_training_features = set(permitted_range_features) - set(
              self.feature_names
          )
          if len(not_training_features) > 0:
              raise UserConfigValidationException(
                  "Got features {0} which are not present in training data".format(
                      not_training_features
                  )
              )
  
          for feature in permitted_range_features:
              if feature in self.categorical_feature_names:
                  train_categories = self.permitted_range[feature]
                  for test_category in permitted_range[feature]:
                      if test_category not in train_categories:
                          raise UserConfigValidationException(
                              "The category {0} does not occur in the training data for feature {1}."
                              " Allowed categories are {2}".format(
                                  test_category,
                                  feature,
                                  train_categories,
                              )
                          )
  
file_path: DiCE/dice_ml/data_interfaces/base_data_interface.py
imports: from abc import ABC, abstractmethod
  import pandas
  from raiutils.exceptions import UserConfigValidationException
  from dice_ml.utils.exception import SystemException
label_desc: Use image node_id 5 for calling the _BaseData obj's underlying member method code with example usage: obj.check_permitted_range(permitted_range) without return types