'The general purpose tone API analyzes the "tone" of input text.
The message is analyzed for several tones (social, emotional, and
writing), with various characteristics derived for each tone.
:param text: The input content to analyze.
:param sentences: If false, sentence-level analysis is omitted; by
default (or if true), each sentence is analyzed.
:param tones: A comma-separated list of one or more of the following
tones for which to analyze the input text, \'social\', \'language\', and
\'emotion\'; the default is all tones.
:param content_type: The type of the input content: "text/plain"
(the default), "text/html", or "application/json".'

def tone(self, text, tones=None, sentences=None, content_type='text/plain'):

    params = {'version': self.version}
    if (tones is not None):
        params['tones'] = tones
    if (sentences is not None):
        params['sentences'] = str(sentences).lower()
    if (content_type == 'text/plain'):
        text = {'text': text}
        content_type = 'application/json'
    headers = {'content-type': content_type}
    if (content_type == 'application/json'):
        return self.request(method='POST', headers=headers, url='/v3/tone', params=params, json=text, accept_json=True)
    if (content_type != 'application/json'):
        return self.request(method='POST', headers=headers, url='/v3/tone', params=params, data=text, accept_json=True)
