code: function invokeToneAssistant(payload, maintainToneHistoryInContext) {
    tone_detection
      .invokeToneAsync(payload, toneAnalyzer)
      .then(tone => {
        tone_detection.updateUserTone(
          payload,
          tone,
          maintainToneHistoryInContext
        );
        assistant.message(payload, function(err, data) {
          if (err) {
            // APPLICATION-SPECIFIC CODE TO PROCESS THE ERROR
            // FROM ASSISTANT SERVICE
            console.error(JSON.stringify(err, null, 2));
          } else {
            // APPLICATION-SPECIFIC CODE TO PROCESS THE DATA
            // FROM ASSISTANT SERVICE
            console.log(JSON.stringify(data, null, 2));
          }
        });
      })
      .catch(function(err) {
        console.log(JSON.stringify(err, null, 2));
      });
  }
docs: invokeToneAssistant calls the invokeToneAsync function to get the tone information for the user's
  input text (input.text in the payload json object), adds/updates the user's tone in the payload's context,
  and sends the payload to the assistant service to get a response which is printed to screen.
  @param payload a json object containing the basic information needed to converse with the Assistant Service's
  message endpoint.
  
  Note: as indicated below, the console.log statements can be replaced with application-specific code to process
  the err or data object returned by the Assistant Service.