This is a replacement part for the cord strain relief on an Apple macbook power adapter. Useful if you've decided to repair a severed magsafe cord by opening the adapter and resoldering the severed cord.
If your cord is not severed and you just want to prevent this from happening, you should use one of the other available designs, like these:
A number of guides for doing the actual repair are available here: https://www.ifixit.com/Device/Apple_AC_Adapter
Just print 2 of these and assemble in place of the hot glue recommended in many of the repair guides. A small zip tie is used in the groove on the end to hold things together.