code: def _add_child(self, collection, set, child):
          
          added = None
          for c in child:
              if c not in set:
                  set.add(c)
                  collection.append(c)
                  added = 1
          if added:
              self._children_reset()
docs: Adds 'child' to 'collection', first checking 'set' to see if it's
          already present.