returns a image of a specific kind

def get_image_by_kind(self, kind):
        """ returns a image of a specific kind """
        for ss in self.images:
            if ss.kind == kind:
                return ss
        return None