def _ensure_empty_image_ok(self):
if self.ignore_empty:<EOL><INDENT>return<EOL><DEDENT>if len(self) > <NUM_LIT:1>:<EOL><INDENT>raise RuntimeError(<EOL>"<STR_LIT>" % len(self))<EOL><DEDENT>if '<STR_LIT>' in self[<NUM_LIT:0>]._info:<EOL><INDENT>raise RuntimeError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>
If ignore_empty was not set to True, we only allow empty HDU for first
HDU and if there is no data there already