code: private Resource getResource(
        final JobSubmissionEvent jobSubmissionEvent) {
  
      return new Resource()
          .setMemory(jobSubmissionEvent.getDriverMemory().get())
          .setvCores(jobSubmissionEvent.getDriverCPUCores().get());
    }
docs: Extracts the resource demands from the jobSubmissionEvent.