code: def test_filter_by_class():
      issues = find_label_issues(
          labels, pred_probs, downsample=1, n_jobs=None, batch_size=1000
      )
      class_0_issues = filter_by_class(
          0, issues, labels=labels, pred_probs=pred_probs
      )
      class_1_issues = filter_by_class(
          1, issues, labels=labels, pred_probs=pred_probs
      )
  
      class_300_issues = filter_by_class(
          300, issues, labels=labels, pred_probs=pred_probs
      )
  
      assert (class_0_issues == class_1_issues).all()  # mirror issues
      assert np.sum(class_300_issues) == 0
  
imports: import numpy
  import random
  import pytest
  from unittest import mock
  import matplotlib.pyplot
  from pathlib import Path
  from cleanlab.internal.multilabel_scorer import softmin
  from cleanlab.internal.segmentation_utils import _check_input, _get_valid_optional_params, _get_summary_optional_params
  from cleanlab.segmentation.filter import find_label_issues
  from cleanlab.segmentation.rank import get_label_quality_scores, issues_from_scores, _get_label_quality_per_image
  from cleanlab.segmentation.summary import display_issues, common_label_issues, filter_by_class, _generate_colormap
label_desc: Use image node_id 21 for calling a global function with example usage: test_filter_by_class() without return types