Email Record: Refactoring a Python script into a library called by Python Click CLI.