docs: def updateSocialTone(user, socialTone, maintainHistory):
      """
      updateSocialTone updates the user with the social tones interpreted based on
      the specified thresholds
      @param user a json object representing user information (tone) to be used in
      conversing with the Conversation Service
      @param socialTone a json object containing the social tones in the payload
      returned by the Tone Analyzer
      """
      currentSocial = []
      currentSocialObject = []
  
      # Process each social tone and determine if it is high or low
      for tone in socialTone['tones']:
          if tone['score'] >= SOCIAL_HIGH_SCORE_THRESHOLD:
              currentSocial.append(tone['tone_name'].lower() + '_high')
              currentSocialObject.append({
                  'tone_name': tone['tone_name'].lower(),
                  'score': tone['score'],
                  'interpretation': 'likely high'
              })
          elif tone['score'] <= SOCIAL_LOW_SCORE_THRESHOLD:
              currentSocial.append(tone['tone_name'].lower() + '_low')
              currentSocialObject.append({
                  'tone_name': tone['tone_name'].lower(),
                  'score': tone['score'],
                  'interpretation': 'likely low'
              })
          else:
              currentSocialObject.append({
                  'tone_name': tone['tone_name'].lower(),
                  'score': tone['score'],
                  'interpretation': 'likely medium'
              })
  
      # update user social tone
      user['tone']['social']['current'] = currentSocial
      if maintainHistory:
          if not user['tone']['social']['current']:
              user['tone']['social']['current'] = []
          user['tone']['social']['current'].append(currentSocialObject)