docs: def CopyNote(self, part, measure_id, new_note):
          '''
           handles copying the latest note into the measure note list.
           done at end of note loading to make sure staff_id is right as staff id could be encountered
           any point during the note tag
          :param part: the part class to copy it into
          :param measure_id: the id of the measure in which the note belongs
          :param new_note: the new note class to be copied in
          :return: None, side effects modifying the piece tree
          '''
  
          if part.getMeasure(measure_id, self.data["staff_id"]) is None:
              part.addEmptyMeasure(measure_id, self.data["staff_id"])
          measure = part.getMeasure(measure_id, self.data["staff_id"])
          voice_obj = measure.getVoice(self.data["voice"])
          if voice_obj is None:
              measure.addVoice(id=self.data["voice"])
              voice_obj = measure.getVoice(self.data["voice"])
          add = True
          notes = voice_obj.GetChildrenIndexes()
          for n in notes:
              no = voice_obj.GetChild(n)
              if new_note == no:
                  add = False
                  break
          if add:
              chord = False
              if hasattr(new_note, "chord"):
                  chord = new_note.chord
  
              measure.addNote(new_note, self.data["voice"], chord=chord)
              if hasattr(
                      new_note, "BarlinesAndMarkersRest") and new_note.BarlinesAndMarkersRest:
                  measure.rest = True
                  voice_obj.rest = True