How to remove the driver?

Hi guys, probably this is silly question here, which I don't know how to remove a driver. I wish to swap my flashlight driver into a better one, but when I disassemble it I wonder how the heck they fit it inside so tightly, whether press-fitting it or using some kind of strong glue I guess?

The driver attachment is something look like the below picture (taken from DX). This is not my flashlight though but the driver placement is more or less similar. I didn't take the real picture of my flashlight is because I lend my camera to my friend for the moment...

Can anyone please show me a way to remove it? Thanks in advance.

EDIT: I hope I can remove it without any damages on it...

they're often just pressed in. I don't think I've seen one glued in.

On the light pictured, the collar you see around the driver unscrews and then you see the pill has a brass ring pressed into it (instead of just the driver) and the driver sits in and is soldered to that ring.

So, first unsolder the leads from the emitter,

then, if the driver is soldered, remove the solder, preferably w/ a desoldering wick or pump

then, insert a tool (a small screwdriver would work) into one of the holes on the edge of the driver and gently lift it out.

if it is pressed in, pry a little on one side, then the other, and continue switching sides until it comes loose.

i'm not very good at explaining things, maybe someone else will be...

Its