def METHOD_NAME(self, step_name, tasks, set_attribs=None, choice=None, only_one_instance=True):
    if only_one_instance:
        self.assertEqual(
            len(tasks), 1, 'Did not find one task for \'%s\' (got %d)' % (step_name, len(tasks)))
    else:
        self.assertNotEqual(
            len(tasks), 0, 'Did not find any tasks for \'%s\'' % (step_name))
    self.assertTrue(
        tasks[0].task_spec.name == step_name or tasks[
            0].task_spec.bpmn_name == step_name,
                   'Expected step %s, got %s (%s)' % (step_name, tasks[0].task_spec.bpmn_name, tasks[0].task_spec.name))
    if not set_attribs:
        set_attribs = {}
    if choice:
        set_attribs['choice'] = choice
    if set_attribs:
        tasks[0].set_data(**set_attribs)
    tasks[0].run()