code: def scalar_inc_dec(word, valence, is_cap_diff):
      """
      Check if the preceding words increase, decrease, or negate/nullify the
      valence
      """
      scalar = 0.0
      word_lower = word.lower()
      if word_lower in BOOSTER_DICT:
          scalar = BOOSTER_DICT[word_lower]
          if valence < 0:
              scalar *= -1
          # check if booster/dampener word is in ALLCAPS (while others aren't)
          if word.isupper() and is_cap_diff:
              if valence > 0:
                  scalar += C_INCR
              else:
                  scalar -= C_INCR
      return scalar
  
imports: import os
  import re
  import math
  import string
  import codecs
  import json
  from itertools import product
  from inspect import getsourcefile
  from io import open
label_desc: Use image node_id 4 for calling a global function with example usage: scalar_inc_dec(word, valence, is_cap_diff) and returns: scalar