def cleanup(self, force=False, delete=False):
<EOL>try:<EOL><INDENT>self.stop()<EOL><DEDENT>except subprocess.CalledProcessError as stop:<EOL><INDENT>logger.debug("<STR_LIT>", stop)<EOL>if not force:<EOL><INDENT>raise stop<EOL><DEDENT>try:<EOL><INDENT>self.kill()<EOL><DEDENT>except subprocess.CalledProcessError as kill:<EOL><INDENT>logger.debug("<STR_LIT>", kill)<EOL>pass<EOL><DEDENT><DEDENT>if delete:<EOL><INDENT>self.delete(force=force)<EOL><DEDENT>
Stop container and delete image if given param delete

:param force: bool, force stop and delete, no errors raised
:param delete: delete images
:return: None