<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_event(self, bpm):
 """Calculate the microseconds per quarter note."""

        ms_per_min = 60000000
        mpqn = a2b_hex('%06x' % (ms_per_min / bpm))
        return self.delta_time + META_EVENT + SET_TEMPO + '\x03' + mpqn