I totally agree but in some case a simple and quick solution is enough. I found this strategy in GCP documentation https://cloud.google.com/functions/docs/bestpractices/tips. I also warn in the article that the function execution environment isn't always preserved.