def METHOD_NAME(self, img, out_exr_path):
    scene = bpy.data.scenes[0]
    image_settings = scene.render.image_settings
    image_settings.file_format = "OPEN_EXR"
    image_settings.color_mode = "RGBA"
    image_settings.color_depth = "32"
    image_settings.exr_codec = "ZIP"
    img.save_render(str(out_exr_path), scene=scene)