<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_Composition(file, composition, bpm=120, repeat=0, verbose=False):
 """Write a mingus.Composition to a MIDI file."""

    m = MidiFile()
    t = []
    for x in range(len(composition.tracks)):
        t += [MidiTrack(bpm)]
    m.tracks = t
    while repeat >= 0:
        for i in range(len(composition.tracks)):
            m.tracks[i].play_Track(composition.tracks[i])
        repeat -= 1
    return m.write_file(file, verbose)