'Parse the <part> element.'

def _parse(self, xml_part, score_parts):

    if ('id' in xml_part.attrib):
        self.id = xml_part.attrib['id']
    if (self.id in score_parts):
        self.score_part = score_parts[self.id]
    else:
        self.score_part = ScorePart()
    self._state.time_position = 0
    self._state.midi_channel = self.score_part.midi_channel
    self._state.midi_program = self.score_part.midi_program
    self._state.transpose = 0
    xml_measures = xml_part.findall('measure')
    for measure in xml_measures:
        self._repair_empty_measure(measure)
        parsed_measure = Measure(measure, self._state)
        self.measures.append(parsed_measure)
