code: def test_run_value_error(adult_split_dataset_and_model):
      # Arrange
      _, test, model = adult_split_dataset_and_model
      check = PerformanceBias(protected_feature="sex")
      check_invalid1 = PerformanceBias(
          protected_feature="invalid_feature"
      )
      check_invalid2 = PerformanceBias(
          protected_feature="sex", control_feature="invalid_feature"
      )
      check_invalid3 = PerformanceBias(
          protected_feature="sex", control_feature="sex"
      )
  
      # Act & Assert
      assert_that(
          calling(check.run).with_args("invalid_data"),
          raises(
              DeepchecksValueError,
              r"non-empty instance of Dataset or DataFrame was expected, instead got str",
          ),
      )
      assert_that(
          calling(check.run).with_args(test),
          raises(
              DeepchecksNotSupportedError,
              r"Check is irrelevant for Datasets without model",
          ),
      )
      assert_that(
          calling(check_invalid1.run).with_args(test, model),
          raises(
              DeepchecksValueError,
              r"Feature invalid_feature not found in dataset.",
          ),
      )
      assert_that(
          calling(check_invalid2.run).with_args(test, model),
          raises(
              DeepchecksValueError,
              r"Feature invalid_feature not found in dataset.",
          ),
      )
      assert_that(
          calling(check_invalid3.run).with_args(test, model),
          raises(
              DeepchecksValueError,
              r"protected_feature and control_feature cannot be the same",
          ),
      )
  
file_path: deepchecks/tests/tabular/checks/model_evaluation/performance_bias_test.py
imports: import numpy
  import pandas
  from hamcrest import all_of, any_of, assert_that, calling, close_to, equal_to, has_entries, has_items, has_length, has_properties, has_property, raises
  from sklearn.metrics import f1_score, make_scorer
  from deepchecks import ConditionCategory
  from deepchecks.core.errors import DeepchecksNotSupportedError, DeepchecksValueError
  from deepchecks.tabular.checks.model_evaluation import PerformanceBias
  from tests.base.utils import equal_condition_result
label_desc: Use image node_id 2 for calling a global function with example usage: test_run_value_error(adult_split_dataset_and_model) without return types