What are the key factors you consider when deciding whether to build a custom solution versus using an existing library?