Simple. Apparently....

Watch this video:

Basically it involves the same practice as <a href="https://gardeningtipsnideas.com/2007/01/vegiforms_novelty_vegetables_anyone.html">Vegiforms</a>. Rather than try and get the fruit into the bottle once it's mature, the bottle is placed over the fruit blooms and the fruit grows inside the bottle.

Once the fruit is fully ripened then the bottle can be removed. Then it's just a matter of filling the bottle with your favourite liqueur and storing. And these can be stored for years - the longer the better.