input: Write a python function to parse simple arithmetic expressions using PEG.js.
  assert parse_expression('2 * (3 + 4)') == "Expected output" 
  assert parse_expression('1 + 1') == "Expected output" 
  assert parse_expression('(2 + 3) * 4') == "Expected output"
output: def parse_expression(expression):
      import parsimonious
      from parsimonious.grammar import Grammar
      from parsimonious.nodes import NodeVisitor
  
      grammar = Grammar(
          """
          expression = term ((add / sub) term)*
          term       = factor ((mul / div) factor)*
          factor     = number / parens
          parens     = "(" expression ")"
          add        = "+"
          sub        = "-"
          mul        = "*"
          div        = "/"
          number     = ~"[0-9]+"
          """
      )
  
      class ExpressionVisitor(NodeVisitor):
          def visit_expression(self, node, visited_children):
              term, rest = visited_children[0], visited_children[1]
              result = term
              for operator, term in rest:
                  if operator == '+':
                      result += term
                  elif operator == '-':
                      result -= term
              return result
  
          def visit_term(self, node, visited_children):
              factor, rest = visited_children[0], visited_children[1]
              result = factor
              for operator, factor in rest:
                  if operator == '*':
                      result *= factor
                  elif operator == '/':
                      result /= factor
              return result
  
          def visit_factor(self, node, visited_children):
              return visited_children[0]
  
          def visit_parens(self, node, visited_children):
              _, expression, _ = visited_children
              return expression
  
          def visit_add(self, node, visited_children):
              return node.text
  
          def visit_sub(self, node, visited_children):
              return node.text
  
          def visit_mul(self, node, visited_children):
              return node.text
  
          def visit_div(self, node, visited_children):
              return node.text
  
          def visit_number(self, node, visited_children):
              return int(node.text)
  
          def generic_visit(self, node, visited_children):
              if visited_children:
                  return visited_children[0]
              return node
  
      tree = grammar.parse(expression)
      result = ExpressionVisitor().visit(tree)
      return result