code: def scan_directory_for_bot_configs(root_dir) -> Set[BotConfigBundle]:
      
  
      configs = set()
  
      for filename in glob.iglob(os.path.join(root_dir, '**/*.cfg'), recursive=True):
          try:
              bundle = get_bot_config_bundle(filename)
              configs.add(bundle)
          except (NoSectionError, MissingSectionHeaderError, NoOptionError, AttributeError, ParsingError, FileNotFoundError):
              pass
  
      return configs
docs: Recursively scans a directory for all valid bot configs.
      :param root_dir: Directory to scan.
      :return: The set of bot configs that were found.