input: Write a function to implement a basic version control system in Python that keeps track of changes in the code. The function should be able to commit changes and restore the code to a previous version. If the log file is empty when restoring, it should return an empty list.
  
  class VersionControl:
      def __init__(self, lines):
          self.lines = lines
          self.mark = 0
   
      def commit(self):
          self.mark += 1
          log_file = open("log_file.txt", "a+")
          log_file.write(str(self.mark) + ": " + str(self.lines) + "\n")
          log_file.close()
   
      def restore(self):
          log_file = open("log_file.txt", "r")
          lines = log_file.readlines()
          log_file.close()
          if lines:
              to_mark = self.mark-1
              self.lines = eval(lines[to_mark].split(": ", 1)[1])
          else:
              self.lines = []
  
  assert VersionControl(["line1", "line2"]).commit() is None == True
  assert VersionControl.restore() == ["line1", "line2"]
  assert VersionControl([]).commit() is None == True
  assert VersionControl.restore() == []
output: def __init__(self, lines):
      self.lines = lines
      self.mark = 0
  
  def commit(self):
      self.mark += 1
      log_file = open("log_file.txt", "a+")
      log_file.write(str(self.mark) + ": " + str(self.lines) + "\n")
      log_file.close()
  
  def restore(self):
      log_file = open("log_file.txt", "r")
      lines = log_file.readlines()
      log_file.close()
      if lines:
          to_mark = self.mark-1
          self.lines = eval(lines[to_mark].split(": ", 1)[1])
      else:
          self.lines = []