input: Write a function to implement a basic version control system in Python that keeps track of changes in the code. The function should define a class named `VersionControl` with an `__init__` method to initialize the lines of code and a mark to track current version number. It should also have a `commit` method to save the current state of the code and a `restore` method to revert the code to a previous saved state.
  
  
  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))
          log_file.close()
      
      def restore(self):
          log_file = open("log_file.txt", "r")
          lines = log_file.readlines()
          to_mark = self.mark - 1
          self.lines = lines[to_mark]
          log_file.close()
  
  # Test cases
  vc = VersionControl(["print('hello')", "print('world')"])
  vc.commit()
  vc.commit()
  vc.restore()
  assert vc.lines == "2: ['print(\\'hello\\')', 'print(\\'world\\')']"
  
  vc = VersionControl(["print('hello')"])
  vc.commit()
  vc.restore()
  assert vc.lines == "1: ['print(\\'hello\\')']"
  
output: class VersionControl:
      def __init__(self, lines):
          self.lines = lines
          self.mark = 0
          self.versions = []
      
      def commit(self):
          self.mark += 1
          self.versions.append(self.lines[:])
      
      def restore(self):
          if self.mark > 0:
              self.mark -= 1
              self.lines = self.versions[self.mark][:]