code: def test_multilabel_dataset(
      multilabel_mock_dataset_and_probabilities,
  ):
      # Arrange
      data, probabilities = multilabel_mock_dataset_and_probabilities
      assert_that(data.is_multi_label_classification(), equal_to(True))
      check = (
          MetadataSegmentsPerformance().add_condition_segments_relative_performance_greater_than()
      )
      # Act
      result = check.run(data, probabilities=probabilities)
      condition_result = check.conditions_decision(result)
  
      # Assert
      # TODO: Check why the details is not consistent
      # assert_that(condition_result, has_items(
      #     equal_condition_result(is_pass=True,
      #                            details='Found a segment with f1 macro score of 0.712 in comparison to an average '
      #                                    'score of 0.83 in sampled data.',
      #                            name='The relative performance of weakest segment is greater '
      #                                 'than 80% of average model performance.')
      # ))
      # TODO: Remove once details becomes consistent
      pat = r"Found a segment with f1 macro score of \d+.\d+ in comparison to an average score of 0.83 in sampled data."
      assert_that(condition_result[0].details, matches_regexp(pat))
      assert_that(
          condition_result[0].name,
          equal_to(
              "The relative performance "
              "of weakest segment is greater "
              "than 80% of average model "
              "performance."
          ),
      )
  
      assert_that(result.value["avg_score"], close_to(0.83, 0.001))
      assert_that(
          len(result.value["weak_segments_list"]), is_in([4, 5])
      )
  
file_path: deepchecks/tests/nlp/checks/model_evaluation/weak_segment_performance_test.py
imports: import numpy
  import pandas
  import pytest
  from hamcrest import assert_that, calling, close_to, equal_to, has_items, is_in, matches_regexp, raises
  from deepchecks.core.errors import DeepchecksNotSupportedError, NotEnoughSamplesError
  from deepchecks.nlp.checks import MetadataSegmentsPerformance, PropertySegmentsPerformance
  from tests.base.utils import equal_condition_result
label_desc: Use image node_id 6 for calling a global function with example usage: test_multilabel_dataset(multilabel_mock_dataset_and_probabilities) without return types