code: def version_control():
      
      curdir_contents = os.listdir('.')
      if '.hg' in curdir_contents:
          return hg.Hg()
      elif '.git' in curdir_contents:
          return git.Git()
      else:
          logger.critical('No version control system detected.')
          sys.exit(1)
docs: Return an object that provides the version control interface based
      on the detected version control system.