code: def test_segment_performance_iris_with_condition(
      iris_split_dataset_and_model,
  ):
      # Arrange
      _, val, model = iris_split_dataset_and_model
      check = (
          WeakSegmentsPerformance().add_condition_segments_relative_performance_greater_than()
      )
  
      # Act
      result = check.run(val, model)
      condition_result = result.conditions_results
      segments = result.value["weak_segments_list"]
  
      # Assert
      assert_that(
          condition_result,
          has_items(
              equal_condition_result(
                  is_pass=False,
                  name="The relative performance of weakest segment is greater than 80% of average model performance.",
                  details="Found a segment with accuracy score of 0.333 in comparison to an average score of 0.92 in sampled "
                  "data.",
              )
          ),
      )
      assert_that(segments, has_length(5))
      assert_that(max(segments.iloc[:, 0]), result.value["avg_score"])
      assert_that(segments.iloc[0, 0], close_to(0.33, 0.01))
      assert_that(segments.iloc[0, 1], equal_to("petal width (cm)"))
  
file_path: deepchecks/tests/tabular/checks/model_evaluation/weak_segments_performance_test.py
imports: import numpy
  import pandas
  from hamcrest import any_of, assert_that, calling, close_to, equal_to, has_items, has_length, raises
  from sklearn.metrics import f1_score, make_scorer
  from deepchecks.core.errors import DeepchecksValueError
  from deepchecks.tabular.checks import WeakSegmentsPerformance
  from deepchecks.tabular.datasets.classification.phishing import load_data, load_fitted_model
  from tests.base.utils import equal_condition_result
label_desc: Use image node_id 3 for calling a global function with example usage: test_segment_performance_iris_with_condition(iris_split_dataset_and_model) without return types