def METHOD_NAME(self, batch_jobs, is_test):
    # Subtle: in order to support dynamic batch jobs, we need to remove the
    # job_submission group and replace with job-based groups
    orig_group = self.get_optional_child(
        "group",
        {"id": "job_submission"},
        err_msg="Looks like job groups have already been created",
    )
    expect(orig_group, "No workflow groups found")
    orig_group_children = super(EnvWorkflow, self).get_children(root=orig_group)
    childnodes = []
    for child in reversed(orig_group_children):
        childnodes.append(child)
    self.remove_child(orig_group)
    for name, jdict in batch_jobs:
        if name == "case.run" and is_test:
            pass  # skip
        elif name == "case.test" and not is_test:
            pass  # skip
        elif name == "case.run.sh":
            pass  # skip
        else:
            new_job_group = self.make_child("group", {"id": name})
            for field in jdict.keys():
                if field == "runtime_parameters":
                    continue
                val = jdict[field]
                node = self.make_child(
                    "entry", {"id": field, "value": val}, root=new_job_group
                )
                self.make_child("type", root=node, text="char")
            for child in childnodes:
                self.add_child(self.copy(child), root=new_job_group)