<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def make_image(self, conf, images, chain=None, parent_chain=None, made=None, ignore_deps=False, ignore_parent=False, pushing=False):
 """Make us an image"""

        made = {} if made is None else made
        chain = [] if chain is None else chain
        parent_chain = [] if parent_chain is None else parent_chain

        if conf.name in made:
            return

        if conf.name in chain and not ignore_deps:
            raise BadCommand("Recursive dependency images", chain=chain + [conf.name])

        if conf.name in parent_chain and not ignore_parent:
            raise BadCommand("Recursive FROM statements", chain=parent_chain + [conf.name])

        if conf.name not in images:
            raise NoSuchImage(looking_for=conf.name, available=images.keys())

        if not ignore_deps:
            for dependency, image in conf.dependency_images():
                self.make_image(images[dependency], images, chain=chain + [conf.name], made=made, pushing=pushing)

        if not ignore_parent:
            for dep in conf.commands.dependent_images:
                if not isinstance(dep, six.string_types):
                    self.make_image(dep, images, chain, parent_chain + [conf.name], made=made, pushing=pushing)

        # Should have all our dependencies now
        log.info("Making image for '%s' (%s)", conf.name, conf.image_name)
        cached = self.build_image(conf, pushing=pushing)
        made[conf.name] = True
        return cached