def get_alter(note):
    alters = note.getElementsByTagName('alter')
if len(alters) == 0:
    return None
return alters[0]

def is_rest(note):
    return len(note.getElementsByTagName('rest')) > 0

def is_accidental(note):
    pass
Extracting information from Musicxml