code: def worker_workerfinished(self, node):
          
          self.config.hook.pytest_testnodedown(node=node, error=None)
          if node.workeroutput["exitstatus"] == 2:  # keyboard-interrupt
              self.shouldstop = "%s received keyboard-interrupt" % (node,)
              self.worker_errordown(node, "keyboard-interrupt")
              return
          if node in self.sched.nodes:
              crashitem = self.sched.remove_node(node)
              assert not crashitem, (crashitem, node)
          self._active_nodes.remove(node)
docs: Emitted when node executes its pytest_sessionfinish hook.
  
          Removes the node from the scheduler.
  
          The node might not be in the scheduler if it had not emitted
          workerready before shutdown was triggered.