code: def test_check_permitted_range_with_unknown_categorical_value(self):
      iris = load_iris(as_frame=True)
      permitted_range = {"new_feature": ["unknown_category"]}
      feature_names = iris.feature_names
      dataset = iris.frame
      dataset["new_feature"] = np.repeat(
          ["known_category"], dataset.shape[0]
      )
  
      dice_data = dice_ml.Data(
          dataframe=dataset,
          continuous_features=feature_names,
          outcome_name="target",
      )
  
      with pytest.raises(UserConfigValidationException) as ucve:
          dice_data.check_permitted_range(
              permitted_range=permitted_range
          )
  
      assert "The category {0} does not occur in the training data for feature {1}. Allowed categories are {2}".format(
          "unknown_category", "new_feature", ["known_category"]
      ) in str(
          ucve
      )
  
imports: from enum import Enum
  import numpy
  import pandas
  import pytest
  from raiutils.exceptions import UserConfigValidationException
  from sklearn.datasets import load_iris
  import dice_ml
  from dice_ml.utils import helpers
label_desc: Use image node_id 3 for calling the TestChecksPublicDataInterface obj's underlying member method code with example usage: obj.test_check_permitted_range_with_unknown_categorical_value() without return types