def METHOD_NAME(adult_split_dataset_and_model):
    # Arrange
    _, val, model = adult_split_dataset_and_model
    val = val.sample()
    val.data['native-country'].iloc[0] = np.nan
    val.data['native-country'] = pd.Categorical(val.data['native-country'])
    val.data['income'] = pd.Categorical(val.data['income'])
    check = WeakSegmentsPerformance(n_top_features=5)
    # Act
    result = check.run(val, model)
    segments = result.value['weak_segments_list']
    # Assert
    assert_that(segments, has_length(7))