docs: def run_process(analysis, action_name, message='__nomessagetoken__'):
          """Executes an action in the analysis with the given message.
  
          It also handles the start and stop signals in the case that message
          is a `dict` with a key ``__process_id``.
  
          :param str action_name: Name of the action to trigger.
          :param message: Message.
          :param callback:
              A callback function when done (e.g.
              :meth:`~tornado.testing.AsyncTestCase.stop` in tests).
          :rtype: tornado.concurrent.Future
          """
  
          if analysis is None:
              return
  
          # detect process_id
          process_id = None
          if isinstance(message, dict) and '__process_id' in message:
              process_id = message['__process_id']
              del message['__process_id']
  
          if process_id:
              yield analysis.emit('__process',
                                  {'id': process_id, 'status': 'start'})
  
          fns = [
              functools.partial(handler, analysis)
              for handler in (analysis._action_handlers.get(action_name, []) +
                              analysis._action_handlers.get('*', []))
          ]
          if fns:
              args, kwargs = [], {}
  
              # Check whether this is a list (positional arguments)
              # or a dictionary (keyword arguments).
              if isinstance(message, list):
                  args = message
              elif isinstance(message, dict):
                  kwargs = message
              elif message == '__nomessagetoken__':
                  pass
              else:
                  args = [message]
  
              for fn in fns:
                  log.debug('calling {}'.format(fn))
                  try:
                      yield tornado.gen.maybe_future(fn(*args, **kwargs))
                  except Exception as e:
                      yield analysis.emit('error', 'an Exception occured')
                      raise e
          else:
              yield analysis.emit('warn',
                                  'no handler for {}'.format(action_name))
  
          if process_id:
              yield analysis.emit('__process',
                                  {'id': process_id, 'status': 'end'})