def modify(self, jmx, is_jmx_generated=False):
    if (not (self.raw_load.iterations or self.raw_load.concurrency or self.load.duration)):
        self.log.debug('No iterations/concurrency/duration found, thread group modification is skipped')
        return
    groups = list(self.tg_handler.groups(jmx))
    if isinstance(self.load.concurrency, str):
        target_list = [(group, self.load.concurrency) for group in groups]
    else:
        raw = (self.load.concurrency is None)
        concurrency_list = []
        for group in groups:
            concurrency = group.get_concurrency(raw=raw)
            if (concurrency is None):
                concurrency = 1
            concurrency_list.append(concurrency)
        if (not raw):
            self._divide_concurrency(concurrency_list)
        target_list = zip(groups, concurrency_list)
    for (group, concurrency) in target_list:
        iterations = None
        existed_tg = ((not is_jmx_generated) and (group.gtype == self.TG))
        if ((not self.force_ctg) and existed_tg):
            iterations = group.get_iterations()
        self.tg_handler.convert(source=group, target_gtype=self.tg, load=self.load, concurrency=concurrency, iterations=iterations)
    if self.load.throughput:
        self._add_shaper(jmx)
    if ((self.tg == self.TG) and self.load.steps):
        self.log.warning("Stepping ramp-up isn't supported for regular ThreadGroup")
def modify(self, jmx, is_jmx_generated=False):
    if (not (self.raw_load.iterations or self.raw_load.concurrency or self.load.duration)):
        self.log.debug('No iterations/concurrency/duration found, thread group modification is skipped')
        return
    groups = list(self.tg_handler.groups(jmx))
    if isinstance(self.load.concurrency, str):
        target_list = [(group, self.load.concurrency) for group in groups]
    else:
        raw = (self.load.concurrency is None)
        concurrency_list = []
        for group in groups:
            concurrency = group.get_concurrency(raw=raw)
            if (concurrency is None):
                concurrency = 1
            concurrency_list.append(concurrency)
        if (not raw):
            self._divide_concurrency(concurrency_list)
        target_list = zip(groups, concurrency_list)
    for (group, concurrency) in target_list:
        iterations = None
        existed_tg = ((not is_jmx_generated) and (group.gtype == self.TG))
        if ((not self.force_ctg) and existed_tg):
            iterations = group.get_iterations()
        self.tg_handler.convert(source=group, target_gtype=self.tg, load=self.load, concurrency=concurrency, iterations=iterations)
    if self.load.throughput:
        self._add_shaper(jmx)
    if ((self.tg == self.TG) and self.load.steps):
        self.log.warning("Stepping ramp-up isn't supported for regular ThreadGroup")