code: def _get_val(other):
      
      assert isinstance(other, (numbers.Number, SymbolNUMBER, SymbolCONST))
      if isinstance(other, SymbolNUMBER):
          return other.value
  
      if isinstance(other, SymbolCONST):
          return other.expr.value
  
      return other
docs: Given a Number, a Numeric Constant or a python number return its value