'Returns a personality profile given input text (at least 100 unique
words)
content_type can be \'text/plain\', \'application/json\' or \'text/html\'
if accept is set to \'text/csv\', returns csv output (with a header row
if csv_headers is set to True)'

def profile(self, text, content_type='text/plain', accept='application/json', language=None, csv_headers=False):

    if isinstance(text, dict):
        text = json.dumps(text)
        content_type = 'application/json'
    headers = {'content-type': content_type, 'accept': accept}
    if language:
        headers['content-language'] = language
    params = {}
    if ((accept == 'text/csv') and csv_headers):
        params['headers'] = 'true'
    response = self.request(method='POST', url='/v2/profile', data=text, params=params, headers=headers)
    if (accept == 'application/json'):
        return response.json()
    return response.text
