code: def get_version(self):
          
          tag = next((tag for tag in self.repo.tags if tag.commit == self.repo.commit()), None)
          if tag:
              return tag
  
          return self.repo.rev_parse(str(self.repo.commit()))
docs: :return: