Stage-probability mapping feature in custom module

Stage-probability mapping feature in custom module

Hi, I'm building a custom module for manage projects. I would like to implement the stage-probability feature that Potentials has. Is this possible?