input: from typing import List
  
  def version_control(lines: List[str]) -> VersionControl:
      """
      Implement a basic version control system in Python that keeps track of changes in the code.
      The VersionControl class will maintain the current state of the code and allow for committing and restoring to previous versions.
  
      Example:
      >>> vc = version_control(["print('Hello, World!')"])
      >>> vc.commit()
      >>> vc.lines = ["print('Hi, World!')"]
      >>> vc.commit()
      >>> vc.restore()
      >>> vc.lines
      ["print('Hello, World!')"]
      """
      return VersionControl(lines)
output:     
  class VersionControl:
      def __init__(self, lines: List[str]):
          self.lines = lines
          self.history = [lines[:]]
  
      def commit(self):
          self.history.append(self.lines[:])
  
      def restore(self):
          if len(self.history) > 1:
              self.history.pop()
              self.lines = self.history[-1][:]
  