code: def _runMainLoop(self, rootJob):
          
          logProcessContext(self.config)
  
          with RealtimeLogger(self._batchSystem,
                              level=self.options.logLevel if self.options.realTimeLogging else None):
              # FIXME: common should not import from leader
              from toil.leader import Leader
              return Leader(config=self.config,
                            batchSystem=self._batchSystem,
                            provisioner=self._provisioner,
                            jobStore=self._jobStore,
                            rootJob=rootJob,
                            jobCache=self._jobCache).run()
docs: Runs the main loop with the given job.
          :param toil.job.Job rootJob: The root job for the workflow.
          :rtype: Any