input: from typing import List
  
  
  def version_control(lines: List[str]) -> VersionControl:
      """Implement a basic version control system that keeps track of changes in the code.
      The system should allow committing changes and restoring to a previous commit.
      >>> version_control(['print("Hello World")', 'print("New change")']).commit()
      >>> version_control(['print("Hello World")', 'print("New change")']).restore()
      """
output:     
      class VersionControl:
          def __init__(self, lines: List[str]):
              self.lines = lines
              self.commits = []
          
          def commit(self):
              self.commits.append(self.lines[:])
          
          def restore(self):
              if self.commits:
                  self.lines = self.commits.pop()
              return self
      
      return VersionControl(lines)
  