@parent_images.setter<EOL><INDENT>def parent_images(self, parents):<DEDENT>
parents = list(parents)<EOL>change_instrs = []<EOL>for instr in self.structure:<EOL><INDENT>if instr['<STR_LIT>'] != '<STR_LIT>':<EOL><INDENT>continue<EOL><DEDENT>old_image, stage = image_from(instr['<STR_LIT:value>'])<EOL>if not old_image:<EOL><INDENT>continue  <EOL><DEDENT>if not parents:<EOL><INDENT>raise RuntimeError("<STR_LIT>")<EOL><DEDENT>image = parents.pop(<NUM_LIT:0>)<EOL>if image != old_image:<EOL><INDENT>instr['<STR_LIT:value>'] = '<STR_LIT>'.format(image, stage) if stage else image<EOL>instr['<STR_LIT:content>'] = '<STR_LIT>'.format(instr['<STR_LIT:value>'])<EOL>change_instrs.append(instr)<EOL><DEDENT><DEDENT>if parents:<EOL><INDENT>raise RuntimeError("<STR_LIT>")<EOL><DEDENT>lines = self.lines<EOL>for instr in reversed(change_instrs):<EOL><INDENT>lines[instr['<STR_LIT>']:instr['<STR_LIT>']+<NUM_LIT:1>] = [instr['<STR_LIT:content>']]<EOL><DEDENT>self.lines = lines<EOL>
setter for images in 'FROM' instructions.
Images are updated per build stage with the given parents in the order they appear.
Raises RuntimeError if a different number of parents are given than there are stages
as that is likely to be a mistake.

:param parents: list of image strings