code: def get_commit_from_tag(self, tag: str) -> Commit:
          
          try:
              selected_tag = self.repo.tags[tag]
              return self.get_commit(selected_tag.commit.hexsha)
          except (IndexError, AttributeError):
              logger.debug('Tag %s not found', tag)
              raise
docs: Obtain the tagged commit.
  
          :param str tag: the tag
          :return: Commit commit: the commit the tag referred to