code: def add_node_collection(self, node, collection):
          
          assert node in self.node2pending
          if not self.collection_is_completed:
              self.node2collection[node] = list(collection)
              self.node2pending[node] = []
              if len(self.node2collection) >= self.numnodes:
                  self.collection_is_completed = True
          elif self._removed2pending:
              for deadnode in self._removed2pending:
                  if deadnode.gateway.spec == node.gateway.spec:
                      dead_collection = self.node2collection[deadnode]
                      if collection != dead_collection:
                          msg = report_collection_diff(
                              dead_collection,
                              collection,
                              deadnode.gateway.id,
                              node.gateway.id,
                          )
                          self.log(msg)
                          return
                      pending = self._removed2pending.pop(deadnode)
                      self.node2pending[node] = pending
                      break
docs: Add the collected test items from a node
  
          Collection is complete once all nodes have submitted their
          collection.  In this case its pending list is set to an empty
          list.  When the collection is already completed this
          submission is from a node which was restarted to replace a
          dead node.  In this case we already assign the pending items
          here.  In either case ``.schedule()`` will instruct the
          node to start running the required tests.