def rm(self, image_name, delete=False):
container = self.get(image_name)<EOL>if container is not None:<EOL><INDENT>name = container.uri or container.get_uri()<EOL>image = container.image<EOL>self.session.delete(container)<EOL>self.session.commit()<EOL>if image is not None:<EOL><INDENT>if os.path.exists(image) and delete is True:<EOL><INDENT>os.remove(container.image)<EOL><DEDENT>return image<EOL><DEDENT>bot.info("<STR_LIT>" % name)<EOL><DEDENT>
Remove an image from the database, akin to untagging the image. This
    does not delete the file from the cache, unless delete is set to True
    (as called by rmi).