docs: def compare(all_dict, others, names, module_name):
      """Return sets of objects only in __all__, refguide, or completely missing."""
      only_all = set()
      for name in all_dict:
          if name not in names:
              only_all.add(name)
  
      only_ref = set()
      missing = set()
      for name in names:
          if name not in all_dict:
              for pat in REFGUIDE_ALL_SKIPLIST:
                  if re.match(pat, module_name + '.' + name):
                      if name not in others:
                          missing.add(name)
                      break
              else:
                  only_ref.add(name)
  
      return only_all, only_ref, missing