code: public CauseOfBlockage canTake(Queue.BuildableItem item) {
          Label l = item.getAssignedLabel();
          if(l!=null && !l.contains(this))
              return CauseOfBlockage.fromMessage(Messages._Node_LabelMissing(getDisplayName(), l));   // the task needs to be executed on label that this node doesn't have.
  
          if(l==null && getMode()== Mode.EXCLUSIVE) {
              // flyweight tasks need to get executed somewhere, if every node
              if (!(item.task instanceof Queue.FlyweightTask && (
                      this instanceof Jenkins
                              || Jenkins.getInstance().getNumExecutors() < 1
                              || Jenkins.getInstance().getMode() == Mode.EXCLUSIVE)
              )) {
                  return CauseOfBlockage.fromMessage(Messages._Node_BecauseNodeIsReserved(getDisplayName()));   // this node is reserved for tasks that are tied to it
              }
          }
  
          Authentication identity = item.authenticate();
          if (!(SKIP_BUILD_CHECK_ON_FLYWEIGHTS && item.task instanceof Queue.FlyweightTask) && !hasPermission(identity, Computer.BUILD)) {
              // doesn't have a permission
              return CauseOfBlockage.fromMessage(Messages._Node_LackingBuildPermission(identity.getName(), getDisplayName()));
          }
  
          // Check each NodeProperty to see whether they object to this node
          // taking the task
          for (NodeProperty prop: getNodeProperties()) {
              CauseOfBlockage c = prop.canTake(item);
              if (c!=null)    return c;
          }
  
          if (!isAcceptingTasks()) {
              return new CauseOfBlockage.BecauseNodeIsNotAcceptingTasks(this);
          }
  
          // Looks like we can take the task
          return null;
      }
docs: Called by the {@link Queue} to determine whether or not this node can
  take the given task. The default checks include whether or not this node
  is part of the task's assigned label, whether this node is in
  {@link Mode#EXCLUSIVE} mode if it is not in the task's assigned label,
  and whether or not any of this node's {@link NodeProperty}s say that the
  task cannot be run.
  
  @since 1.413