code: def test_find_overlapping_classes_with_confident_joint(
      confident_joint,
  ):
      # Setup
      K = confident_joint.shape[0]
      overlapping_classes = find_overlapping_classes(
          confident_joint=confident_joint
      )
  
      # Test that the output dataframe has the expected columns
      expected_columns = [
          "Class Index A",
          "Class Index B",
          "Num Overlapping Examples",
          "Joint Probability",
      ]
      assert set(overlapping_classes.columns) == set(expected_columns)
  
      # Class indices must be valid
      assert (
          overlapping_classes["Class Index A"].between(0, K - 1).all()
      )
      assert (
          overlapping_classes["Class Index B"].between(0, K - 1).all()
      )
  
      # Overlapping example count should be non-negative integers
      assert (
          overlapping_classes["Num Overlapping Examples"] >= 0
      ).all()
      assert (
          overlapping_classes["Num Overlapping Examples"].dtype == int
      )
  
      # Joint probabilities should be between 0 and 1
      assert (overlapping_classes["Joint Probability"] >= 0).all()
      assert (overlapping_classes["Joint Probability"] <= 1).all()
  
      # Joint probabilities sorted in descending order
      if K > 2:
          assert (
              overlapping_classes["Joint Probability"].diff()[1:] <= 0
          ).all()
  
file_path: cleanlab/tests/test_dataset.py
imports: import requests
  import pytest
  import hypothesis.extra.numpy
  import hypothesis.strategies
  import io
  import numpy
  from hypothesis import given, settings
  from cleanlab.dataset import health_summary, find_overlapping_classes, rank_classes_by_label_quality, overall_label_health_score
  from cleanlab.count import estimate_joint, num_label_issues, compute_confident_joint
label_desc: Use image node_id 8 for calling a global function with example usage: test_find_overlapping_classes_with_confident_joint(confident_joint) without return types