'Parse the <score-part> element to an in-memory representation.'

def _parse(self, xml_score_part):

    self.id = xml_score_part.attrib['id']
    if (xml_score_part.find('part-name') is not None):
        self.part_name = (xml_score_part.find('part-name').text or '')
    xml_midi_instrument = xml_score_part.find('midi-instrument')
    if ((xml_midi_instrument is not None) and (xml_midi_instrument.find('midi-channel') is not None) and (xml_midi_instrument.find('midi-program') is not None)):
        self.midi_channel = int(xml_midi_instrument.find('midi-channel').text)
        self.midi_program = int(xml_midi_instrument.find('midi-program').text)
    else:
        self.midi_channel = DEFAULT_MIDI_CHANNEL
        self.midi_program = DEFAULT_MIDI_PROGRAM
