def __contains__(self, item):
        """
        Returns a boolean indicating whether the given job instance or job id
        is scheduled for execution.
        """
        job_id = item
        if isinstance(item, self.job_class):
            job_id = item.id
        return self.connection.zscore(self.scheduled_jobs_key, job_id) is not None
def __contains__ ( self , item ) : job_id = item if isinstance ( item , self . job_class ) : job_id = item . id return self . connection . zscore ( self . scheduled_jobs_key , job_id ) is not None
Returns a boolean indicating whether the given job instance or job id
        is scheduled for execution.