class_docstr: Property-based tests properties of near duplicate sets found in a knn graph.
code: def test_symmetric_and_flagged_consistency(self, issue_manager):
      near_duplicate_sets = issue_manager.info["near_duplicate_sets"]
      issues = issue_manager.issues["is_near_duplicate_issue"]
  
      # Test symmetry: If A is in near_duplicate_set of B, then B should be in near_duplicate_set of A.
      for i, near_duplicates in enumerate(near_duplicate_sets):
          for j in near_duplicates:
              assert (
                  i in near_duplicate_sets[j]
              ), f"Example {j} is in near_duplicate_set of {i}, but not vice versa"
  
      # Test consistency of flags with near_duplicate_sets
      for i, near_duplicate_set in enumerate(near_duplicate_sets):
          if issues[i]:
              # Near duplicate sets of flagged examples should not be empty
              assert (
                  len(near_duplicate_set) > 0
              ), f"Near duplicate set of flagged example {i} is empty"
  
              # Check if all examples in the near_duplicate_set of a flagged example are also flagged
              flagged_in_set = [issues[j] for j in near_duplicate_set]
              assert all(
                  flagged_in_set
              ), f"Example {i} is flagged as near_duplicate but some examples in its near_duplicate_set are not flagged"
  
imports: import numpy
  import pytest
  from hypothesis import HealthCheck, assume, given, settings, strategies
  from hypothesis.strategies import composite
  from hypothesis.extra.numpy import arrays
  from cleanlab import Datalab
  from cleanlab.datalab.internal.issue_manager.duplicate import NearDuplicateIssueManager
  from .conftest import knn_graph_strategy
label_desc: Use image node_id 2 for calling the TestNearDuplicateSets obj's underlying member method code with example usage: obj.test_symmetric_and_flagged_consistency(issue_manager) without return types