def _check_submodule(self):
if (self.path is None or<EOL>(os.path.exists(self.path) and not os.path.isdir(self.path))):<EOL><INDENT>return False<EOL><DEDENT>if self.use_git:<EOL><INDENT>return self._check_submodule_using_git()<EOL><DEDENT>else:<EOL><INDENT>return self._check_submodule_no_git()<EOL><DEDENT>
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.