This is part of the assignment for The Data Scientist’s Toolbox course