code: def sum_dice(spec):
      
      if spec[0] == 'c': return spec[1]
      elif spec[0] == 'r': return sum(spec[1])
      elif spec[0] == 'x':
          return [sum_dice(r) for r in spec[1]]
      elif spec[0] in ops:
          return (spec[0], sum_dice(spec[1]), sum_dice(spec[2]))
      else: raise ValueError("Invalid dice specification")
docs: Replace the dice roll arrays from roll_dice in place with summations of
      the rolls.