code: def require_clean_submodules(repo_root, submodules):
      
      # PACKAGERS: Add a return here to skip checks for git submodules
  
      # don't do anything if nothing is actually supposed to happen
      for do_nothing in (
              '-h', '--help', '--help-commands', 'clean', 'submodule'):
          if do_nothing in sys.argv:
              return
  
      status = _check_submodule_status(repo_root, submodules)
  
      if status == "missing":
          print("checking out submodules for the first time")
          _update_submodules(repo_root)
      elif status == "unclean":
          print(UNCLEAN_SUBMODULES_MSG)
docs: Check on git submodules before distutils can do anything
      Since distutils cannot be trusted to update the tree
      after everything has been set in motion,
      this is not a distutils command.