<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_tempo(self, bpm):
 """Convert the bpm to a midi event and write it to the track_data."""

        self.bpm = bpm
        self.track_data += self.set_tempo_event(self.bpm)