code: def check_tags(repos, tags, ignore_existing=False, fail_fast=False):
      
  
      debug("looking for {n} tag(s):".format(n=len(tags)))
      [debug("  {t}".format(t=t)) for t in tags]
      debug("in {n} repo(s):".format(n=len(repos)))
      [debug("  {r}".format(r=r.full_name)) for r in repos]
  
      # present/missing tags by repo name
      present_tags = {}
      absent_tags = {}
  
      problems = []
      for r in repos:
          has_tags = find_tags_in_repo(r, tags)
          if has_tags:
              if not ignore_existing:
                  yikes = GitTagExistsError(
                      "tag(s) {tag} already exists in repos {r}".format(
                          tag=list(has_tags.keys()),
                          r=r.full_name
                      ))
                  if fail_fast:
                      raise yikes
                  problems.append(yikes)
                  error(yikes)
  
              present_tags[r.full_name] = {
                  'repo': r,
                  'tags': list(has_tags.values()),
              }
  
          missing_tags = [x for x in tags if x not in has_tags]
          if missing_tags:
              absent_tags[r.full_name] = {
                  'repo': r,
                  'need_tags': missing_tags,
              }
  
      debug(textwrap.dedent("""\
          found:
            {n_with:>4} repos with tag(s)
            {n_none:>4} repos with no tag(s)
            {errors:>4} repos with error(s)\
          """).format(
          n_with=len(present_tags),
          n_none=len(absent_tags),
          errors=len(problems),
      ))
  
      return present_tags, absent_tags, problems
docs: check if tags already exist in repos