title: Generating "friend circles" from a dict of connections [python]
body: <p>I have a dict of Facebook friends that looks like this:</p>
  
  <pre><code>connections = {
  0: set([3, 4]), 
  1: set([5]), 
  2: set([]),
  3: set([0, 4, 6]), 
  4: set([0, 3]), 
  5: set([1]), 
  6: set([3])}
  </code></pre>
  
  <p>where this dict matches a person (i.e. 3) to his friends (0, 4, 6). Now, I want to create a set of "friend circles" such that EVERY PERSON in the friend circle is friends with EVERY OTHER PERSON in the friend circle. It should look like this:
  <code>{{0, 3, 4}, {3, 4}, {0, 4}, {0, 3}, {1, 5}, ...}</code>
  Is there a simple way to accomplish this?</p>