docs: def add_note(note, **kwargs):
      """
      Add a new note
      """
      note_i = Note()
      note_i.ref_key = note.ref_key
  
      note_i.set_ref(note.ref_key, note.ref_id)
  
      note_i.value = note.value
  
      note_i.created_by = kwargs.get('user_id')
  
      db.DBSession.add(note_i)
      db.DBSession.flush()
  
      return note_i