<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def convert(self, blob, size=500):
 """Size is the maximum horizontal size."""

        file_list = []
        with make_temp_file(blob) as in_fn, make_temp_file() as out_fn:
            try:
                subprocess.check_call(["pdftoppm", "-jpeg", in_fn, out_fn])
                file_list = sorted(glob.glob(f"{out_fn}-*.jpg"))

                converted_images = []
                for fn in file_list:
                    converted = resize(open(fn, "rb").read(), size, size)
                    converted_images.append(converted)

                return converted_images
            except Exception as e:
                raise ConversionError("pdftoppm failed") from e
            finally:
                for fn in file_list:
                    try:
                        os.remove(fn)
                    except OSError:
                        pass