code: def add_fact(term, fact, author=''):
      
      logger.info('Adding new fact %s: %s', term, fact)
  
      if not db.facts.find({'term': term_regex(term)}).count():
          db.facts.insert({
              'term': term,
              'fact': fact,
              'set_by': author,
              'set_date': time.time()
          })
          db.facts.ensure_index('term')
docs: Records a new fact with a given term. Optionally can set an author