code: def append_literal(rule, literal):
      """
      Append a literal to a rule. It will delete unnecessary literals in that rule after append
  
      Parameters
      ----------
      rule : list
          Target rule
      literal : Literal
          New literal
      """
      # nominal variable will not be added twice
      if literal.op != EQ:
          # start from the last condition
          for i in range(len(rule) - 1, -1, -1):
              # delete redundant conditions
              if rule[i].name == literal.name:
                  if rule[i].op == literal.op:
                      if literal.op == LE:
                          if literal.num_val < rule[i].num_val:
                              del rule[i]
                      else:
                          if literal.num_val > rule[i].num_val:
                              del rule[i]
      # add condition to the rule
      rule.append(literal)
  
imports: import numpy
  import numba
label_desc: Use image node_id 15 for calling a global function with example usage: append_literal(rule, literal) without return types