Libraries are imported for a small number of use cases, which means they can contain a significant amount of code that is redundant to the contract. If we can safely and effectively implement the functionality imported from a library within our contract, it is optimal to do so.