code: def _reschedule(self, node):
          
  
          # Do not add more work to a node shutting down
          if node.shutting_down:
              return
  
          # Check that more work is available
          if not self.workqueue:
              node.shutdown()
              return
  
          self.log("Number of units waiting for node:", len(self.workqueue))
  
          # Check that the node is almost depleted of work
          # 2: Heuristic of minimum tests to enqueue more work
          if self._pending_of(self.assigned_work[node]) > 2:
              return
  
          # Pop one unit of work and assign it
          self._assign_work_unit(node)
docs: Maybe schedule new items on the node.
  
          If there are any globally pending work units left then this will check
          if the given node should be given any more tests.