input: Write a function to create a basic version control system in Python that keeps track of changes in the code. The system should allow for committing changes and restoring to previous versions. The function should return an instance of the VersionControl class, which should include methods for committing and restoring changes.
  assert VersionControl.restore(VersionControl(["line1", "line2"])).lines == ["line1", "line2"]
  assert VersionControl.commit(VersionControl(["line3", "line4"])) is True
  assert VersionControl.restore(VersionControl([])).lines == []
  assert VersionControl.commit(VersionControl(["line5"])) is True
  assert VersionControl.restore(VersionControl(["line6"])).lines == ["line5"]
output: class VersionControl:
      def __init__(self, lines):
          self.lines = lines
          self.history = [lines[:]]
  
      @staticmethod
      def commit(instance):
          instance.history.append(instance.lines[:])
          return True
  
      @staticmethod
      def restore(instance):
          if len(instance.history) > 1:
              instance.history.pop()
              instance.lines = instance.history[-1][:]
          return instance