You've been asked to add some new functionality to a project.
There is a module or library available that you could download and use.
You could write a custom module.
But do you really need it?
Is there another way to implement the feature without adding more modules or libraries to your application or writing custom code?
Is there an alternative implementation that is easier to implement with what you already have?
How flexible are the requirements?
Can they be bent to fit within an existing solution?
Having less code in your application will make it easier to maintain and upgrade in the future, so keep it as lean and minimal as possible.