<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def images(self, type):
 """ Return the list of images available for this type on controller and on the compute node. """

        images = []

        res = yield from self.http_query("GET", "/{}/images".format(type), timeout=None)
        images = res.json

        try:
            if type in ["qemu", "dynamips", "iou"]:
                for local_image in list_images(type):
                    if local_image['filename'] not in [i['filename'] for i in images]:
                        images.append(local_image)
                images = sorted(images, key=itemgetter('filename'))
            else:
                images = sorted(images, key=itemgetter('image'))
        except OSError as e:
            raise ComputeError("Can't list images: {}".format(str(e)))
        return images