def getRootJobs(self):
        """
        :return: The roots of the connected component of jobs that contains this job. \
        A root is a job with no predecessors.

        :rtype : set of toil.job.Job instances
        """
        roots = set()
        visited = set()
        #Function to get the roots of a job
        def getRoots(job):
            if job not in visited:
                visited.add(job)
                if len(job._directPredecessors) > 0:
                    list(map(lambda p : getRoots(p), job._directPredecessors))
                else:
                    roots.add(job)
                #The following call ensures we explore all successor edges.
                list(map(lambda c : getRoots(c), job._children +
                    job._followOns))
        getRoots(self)
        return roots
:return: The roots of the connected component of jobs that contains this job. \
        A root is a job with no predecessors.

        :rtype : set of toil.job.Job instances