docs: public boolean onScheduleAsLibrary(
        Config config,
        Config runtime,
        IScheduler scheduler,
        PackingPlan packing) {
      boolean ret = false;
  
      try {
        scheduler.initialize(config, runtime);
        ret = scheduler.onSchedule(packing);
  
        if (ret) {
          // Set the SchedulerLocation at last step,
          // since some methods in IScheduler will provide correct values
          // only after IScheduler.onSchedule is invoked correctly
          ret = SchedulerUtils.setLibSchedulerLocation(runtime, scheduler, false);
        } else {
          LOG.severe("Failed to invoke IScheduler as library");
        }
      } finally {
        scheduler.close();
      }
  
      return ret;
    }