docs: def highlights_worker(work_unit):
      '''coordinate worker wrapper around :func:`maybe_create_highlights`
      '''
      if 'config' not in work_unit.spec:
          raise coordinate.exceptions.ProgrammerError(
              'could not run `create_highlights` without global config')
  
      web_conf = Config()
      unitconf = work_unit.spec['config']
      with yakonfig.defaulted_config([coordinate, kvlayer, dblogger, web_conf],
                                     config=unitconf):
          file_id = make_file_id(work_unit.key)
          web_conf.kvlclient.setup_namespace(highlights_kvlayer_tables)
          payload_strs = list(web_conf.kvlclient.get('files', file_id))
          if payload_strs and payload_strs[0][1]:
              payload_str = payload_strs[0][1]
              try:
                  data = json.loads(payload_str)
                  # now create the response payload
                  maybe_store_highlights(file_id, data, web_conf.tfidf, web_conf.kvlclient)
              except Exception, exc:
                  logger.critical('failed to decode data out of %r', 
                                  payload_str, exc_info=True)
                  payload = {
                      'state': ERROR,
                      'error': {
                          'code': 7,
                          'message': 'failed to generate stored results:\n%s' % \
                          traceback.format_exc(exc)}
                      }
                  payload_str = json.dumps(payload)
                  kvlclient.put('highlights', (file_id, payload_str))