code: def test_find_issues_feature_subset(
      self, issue_manager, iris_data, monkeypatch
  ):
      features, pred_probs, labels = (
          iris_data["features"],
          iris_data["pred_probs"],
          iris_data["labels"],
      )
      # TODO: Better asserts required. Ideally -> 3 clusters, 50 samples with issue.
      monkeypatch.setattr(
          issue_manager.datalab._labels, "labels", labels
      )
      monkeypatch.setattr(
          issue_manager, "clustering_kwargs", {"eps": 0.5}
      )
      # Find underperforming group based on one feature
      single_feature = features[:, 0].reshape(-1, 1)
      issue_manager.find_issues(
          features=single_feature, pred_probs=pred_probs
      )
      assert (
          np.sum(issue_manager.issues["is_underperforming_group_issue"])
          == 16
      )
      # Find underperforming group based on two features
      monkeypatch.setattr(issue_manager, "info", {})
      issue_manager.find_issues(
          features=features[:, [1, 3]], pred_probs=pred_probs
      )
      assert (
          np.sum(issue_manager.issues["is_underperforming_group_issue"])
          == 49
      )
      # Find underperforming group based on all features
      monkeypatch.setattr(issue_manager, "info", {})
      issue_manager.find_issues(
          features=features, pred_probs=pred_probs
      )
      assert (
          np.sum(issue_manager.issues["is_underperforming_group_issue"])
          == 48
      )
  
file_path: cleanlab/tests/datalab/issue_manager/test_underperforming_group.py
imports: import numpy
  import pytest
  import pandas
  import scipy.sparse
  from cleanlab.datalab.internal.issue_manager.underperforming_group import UnderperformingGroupIssueManager
  from sklearn.datasets import make_blobs, load_iris
label_desc: Use image node_id 10 for calling the TestUnderperformingGroupIssueManager obj's underlying member method code with example usage: obj.test_find_issues_feature_subset(issue_manager, iris_data, monkeypatch) without return types