Button to call OOM_KILL on Raspberry Pi

I was looking around online and was wondering if there was a way to make a button widget that called an OOM kill on Raspberry Pi

have a look at this Executing custom code on your Raspberry Pi from Cayenne

Thanks