input: Write a function to implement a basic version control system in Python that keeps track of changes in the code. The function should include a class named `VersionControl` with an initializer method `__init__` that takes a list of lines of code as input. The class should also have a `commit` method that logs the current state of the code at a specific mark and a `restore` method that restores the code to a previous state based on the last commit.
  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()
  
  assert VersionControl(["import os", "def main():"]) == class instance
  vc = VersionControl(["import os", "def main():"])
  vc.commit()
  assert open("log_file.txt").read() == "1: ['import os', 'def main():']\n"
output: 
  class VersionControl:
      def __init__(self, lines):
          self.lines = lines
          self.mark = 0
          self.commits = []
  
      def commit(self):
          self.mark += 1
          self.commits.append(self.lines[:])
  
      def restore(self):
          if self.mark > 0:
              self.mark -= 1
              self.lines = self.commits[self.mark][:]
  