Software Shutdown Triggered by Jetson GPIO

No, I’m not going to design a custom board.
At this time, I’d like to know if L4T actually has a built-in mechanism to do shutdown triggered by GPIO, which is described at How to soft Shutdown Jetson nano with GPIO. If so, I’d like to know how to map Jetson’s GPIO to the shutdown trigger.
Thanks.