input: Write a function to implement a basic version control system in Python that keeps track of changes in the code. The version control system should have methods to commit and restore changes to the code. The commit method should store the current version of the code in a log file along with a version number, and the restore method should retrieve the code from the log file to a previous version based on the version number.
  
  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(['print("Hello, World!")']).commit() is None
  assert VersionControl(['print("Hello, World!")']).restore() is None
  assert VersionControl(['print("Goodbye, World!")']).commit() is None
  assert VersionControl(['print("Goodbye, World!")']).restore() is None
output: class VersionControl:
      def __init__(self, lines):
          self.lines = lines
          self.mark = 0
   
      def commit(self):
          self.mark += 1
          with open("log_file.txt", "a+") as log_file:
              log_file.write(f"{self.mark}: {self.lines}\n")
   
      def restore(self, version_number):
          with open("log_file.txt", "r") as log_file:
              lines = log_file.readlines()
              for line in lines:
                  if line.startswith(f"{version_number}: "):
                      self.lines = eval(line.split(": ", 1)[1])
                      break