code: def _notebook(trigger, note_store):
          
          note = Types.Note()
          if trigger.notebook:
              # get the notebookGUID ...
              notebook_id = EvernoteMgr.get_notebook(note_store, trigger.notebook)
              # create notebookGUID if it does not exist then return its id
              note.notebookGuid = EvernoteMgr.set_notebook(note_store, trigger.notebook, notebook_id)
  
              if trigger.tag:
                  # ... and get the tagGUID if a tag has been provided
                  tag_id = EvernoteMgr.get_tag(note_store, trigger.tag)
                  if tag_id is False:
                      tag_id = EvernoteMgr.set_tag(note_store, trigger.tag, tag_id)
                      # set the tag to the note if a tag has been provided
                      if tag_id:
                          note.tagGuids = tag_id
  
              logger.debug("notebook that will be used %s", trigger.notebook)
          return note
docs: :param trigger: trigger object
          :param note_store: note_store object
          :return: note object