'Check if the specified destinations ``destination_ids`` have at
least ``num_jobs`` assigned to it - send in ``job_state`` as ``queued``
to limit this check to number of jobs queued.
See stock_rules for an simple example of using this function - but to
get the most out of it - it should probably be used with custom job
rules that can respond to the bursting by allocating resources,
launching cloud nodes, etc....'

def should_burst(self, destination_ids, num_jobs, job_states=None):

    if (job_states is None):
        job_states = 'queued,running'
    from_destination_job_count = self.job_count(for_destinations=destination_ids, for_job_states=util.listify(job_states))
    return ((from_destination_job_count + 1) > int(num_jobs))
