title: having pairs of equal objects generate lists of equal objects
body: <p>I have list of objects ids and a list of tuples representing all possible combinations of tests for equality between the objects:</p>
  
  <pre><code>objects_ids=[1,2,3,4,5,6]
  tests = [
      (1, 2, 0),
      (1, 3, 0),
      (1, 4, 1),
      (1, 5, 1),
      (1, 6, 0),
      (2, 3, 1),
      (2, 4, 0),
      (2, 5, 0),
      (2, 6, 0),
      (3, 4, 0),
      (3, 5, 0),
      (3, 6, 0),
      (4, 5, 1),
      (4, 6, 0),
      (5, 6, 0),
  ]
  
  (1, 4, 1) - means that object #1 is equal to object #4
  (1, 2, 0) - means that #1 is NOT equal to object #2
  </code></pre>
  
  <p>I need to generate groups of equal objects so the result will look like:</p>
  
  <pre><code>[[1,4,5], [2,3], [6]]
  </code></pre>
  
  <p>Is there a more or less efficient way of doing it? </p>