code: def lowest_cost_action(ic, dc, sc, im, dm, sm, cost):
      
      best_action = None
      best_match_count = -1
      min_cost = min(ic, dc, sc)
      if min_cost == sc and cost == 0:
          best_action = EQUAL
          best_match_count = sm
      elif min_cost == sc and cost == 1:
          best_action = REPLACE
          best_match_count = sm
      elif min_cost == ic and im > best_match_count:
          best_action = INSERT
          best_match_count = im
      elif min_cost == dc and dm > best_match_count:
          best_action = DELETE
          best_match_count = dm
      return best_action
docs: Given the following values, choose the action (insertion, deletion,
      or substitution), that results in the lowest cost (ties are broken using
      the 'match' score).  This is used within the dynamic programming algorithm.
  
      * ic - insertion cost
  
      * dc - deletion cost
  
      * sc - substitution cost
  
      * im - insertion match (score)
  
      * dm - deletion match (score)
  
      * sm - substitution match (score)