Updated banners.py

Removed unnecessary import.
Added a function to avoid duplicating code.

Functionality was not changed.