create code in python to generate bass line base on key signature, chord progression and number of bars