def module(self) -> "Repo":
        """
        :return:
            :class:`~git.repo.base.Repo` instance initialized from the repository at our
            submodule path

        :raise git.exc.InvalidGitRepositoryError:
            If a repository was not available.
            This could also mean that it was not yet initialized.
        """
        module_checkout_abspath = self.abspath
        try:
            repo = git.Repo(module_checkout_abspath)
            if repo != self.repo:
                return repo
            # END handle repo uninitialized
        except (InvalidGitRepositoryError, NoSuchPathError) as e:
            raise InvalidGitRepositoryError("No valid repository at %s" % module_checkout_abspath) from e
        else:
            raise InvalidGitRepositoryError("Repository at %r was not yet checked out" % module_checkout_abspath)
        # END handle exceptions

        :return:
            :class:`~git.repo.base.Repo` instance initialized from the repository at our
            submodule path

        :raise git.exc.InvalidGitRepositoryError:
            If a repository was not available.
            This could also mean that it was not yet initialized.
        
git/objects/submodule/base.py