def _ProcessResult(submit_fn, op, result):
  if isinstance(result, cmdlib.ResultWithJobs):
    # Copy basic parameters (e.g. priority)
    map(compat.partial(_SetBaseOpParams, op,
                       "Submitted by %s" % op.OP_ID),
        itertools.chain(*result.jobs))

    # Submit jobs
    job_submission = submit_fn(result.jobs)

    # Build dictionary
    result = result.other

    assert constants.JOB_IDS_KEY not in result, \
      "Key '%s' found in additional return values" % constants.JOB_IDS_KEY

    result[constants.JOB_IDS_KEY] = job_submission

  return result
Ensure we cannot delete an event with related tasks and awards.
dataset/ETHPy150Open ganeti/ganeti/lib/mcpu.py/_ProcessResult--crossover with--dataset/ETHPy150Open swcarpentry/amy/workshops/test/test_event.py/TestEvent.test_delete_event_with_tasks_and_awards