code: def handle_memory(self, obj):
          
          if obj.subject is not None:
              with self.con as db:
                  SchemaBase.note(
                      db,
                      obj.subject,
                      obj.state,
                      obj.object,
                      text=obj.text,
                      html=obj.html,
                  )
          return obj
docs: Handle a memory event.
  
          This function accesses the internal database. It writes a record
          containing state information and an optional note.
  
          :param obj: A :py:class:`~turberfield.dialogue.model.Model.Memory`
              object.
          :return: The supplied object.