code: def tag_dates(repo, pattern=""):
      """Get timestamps for annotated tags.
  
      Parameters
      ----------
      repo : GitRepo
      pattern : str
          Limit the tags by this pattern. It will be appended to 'refs/tags'
          argument passed to `git for-each-ref`.
  
      Returns
      -------
      A generator object that returns a tuple with the tag hexsha and timestamp.
      """
      for rec in repo.for_each_ref_(
          fields=["objectname", "taggerdate:raw"],
          pattern="refs/tags/" + pattern,
      ):
          if not rec["taggerdate:raw"]:
              # There's not a tagger date. It's not an annotated tag.
              continue
          yield rec["objectname"], int(rec["taggerdate:raw"].split()[0])
  
file_path: datalad/datalad/support/repodates.py
imports: import logging
  import operator
  import re
  import time
  from datalad.log import log_progress
  from datalad.support.exceptions import CommandError
  from datalad.support.gitrepo import GitRepo
label_desc: Use image node_id 6 for calling a global function with example usage: tag_dates(repo, pattern) without return types