This will securely hold an the detachable side handle used by M18 drills.
I recommend printing with four or so parameters for strength. No supports are necessary. The included holes are sized for #6 wood screws.
I have designed other similar holders for a variety of M18 tools.