code: def _check_submodule(self):
          
  
          if (self.path is None or
                  (os.path.exists(self.path) and not os.path.isdir(self.path))):
              return False
  
          if self.use_git:
              return self._check_submodule_using_git()
          else:
              return self._check_submodule_no_git()
docs: Check if the given path is a git submodule.
  
          See the docstrings for ``_check_submodule_using_git`` and
          ``_check_submodule_no_git`` for further details.