docs: public static VirtualChannel getChannelToMaster() {
          if (Jenkins.getInstanceOrNull()!=null) // check if calling thread is on master or on slave
              return FilePath.localChannel;
  
          // if this method is called from within the agent computation thread, this should work
          Channel c = Channel.current();
          if (c!=null && Boolean.TRUE.equals(c.getProperty("slave")))
              return c;
  
          return null;
      }