def METHOD_NAME(self, ion_images_rdd, alpha_channel, n_peaks):
    logger.info('Posting iso images to image store')
    png_generator = PngGenerator(alpha_channel, greyscale=True)
    ds_id = self.ds_id
    sm_config = SMConfig.get_conf()
    def generate_png_and_post(partition):
        image_storage = ImageStorage(sm_config)
        for formula_i, imgs in partition:
            iso_image_ids = [None] * n_peaks
            for k, img in enumerate(imgs):
                if img is not None:
                    img_bytes = png_generator.generate_png(img.toarray())
                    iso_image_ids[k] = image_storage.post_image(
                        image_storage.ISO, ds_id, img_bytes
                    )
            yield formula_i, iso_image_ids
    return dict(ion_images_rdd.mapPartitions(generate_png_and_post).collect())