def METHOD_NAME(args: Namespace) -> typing.Generator[str, None, None]:
    """
    Converts the metadata part.
    """
    if not args.flag("no_metadata"):
        info("converting metadata")
        # data_formatter = DataFormatter()
    # required for player palette and color lookup during SLP conversion.
    yield "palette"
    palettes = get_palettes(args.srcdir, args.game_version)
    # store for use by convert_media
    args.palettes = palettes
    if args.flag("no_metadata"):
        return
    gamedata_path = args.targetdir.joinpath('gamedata')
    if gamedata_path.exists():
        gamedata_path.removerecursive()
    args.converter = get_converter(args.game_version)
    # Read .dat
    yield "empires.dat"
    debug_gamedata_format(args.debugdir, args.debug_info, args.game_version)
    gamespec = get_gamespec(args.srcdir, args.game_version, not args.flag("no_pickle_cache"))
    # Blending mode count
    if args.game_version.edition.game_id == "SWGB":
        args.blend_mode_count = gamespec[0]["blend_mode_count_swgb"].value
    else:
        args.blend_mode_count = None
    # Read strings
    string_resources = get_string_resources(args)
    debug_string_resources(args.debugdir, args.debug_info, string_resources)
    # Existing graphic IDs/filenames
    existing_graphics = get_existing_graphics(args)
    debug_registered_graphics(args.debugdir, args.debug_info, existing_graphics)
    # Convert
    modpacks = args.converter.convert(gamespec,
                                      args,
                                      string_resources,
                                      existing_graphics)
    for modpack in modpacks:
        ModpackExporter.export(modpack, args)
        debug_modpack(args.debugdir, args.debug_info, modpack)
    yield "player color palette"
    # player_palette = PlayerColorTable(palette)
    # data_formatter.add_data(player_palette.dump("player_palette"))
    yield "terminal color palette"
    # termcolortable = ColorTable(URXVTCOLS)
    # data_formatter.add_data(termcolortable.dump("termcolors"))
    yield "game specification files"
    # data_formatter.export(args.targetdir, ("csv",))
    if args.flag('gen_extra_files'):
        dbg("generating extra files for visualization")
        # tgt = args.targetdir
        # with tgt['info/colortable.pal.png'].open_w() as outfile:
        #     palette.save_visualization(outfile)
        # with tgt['info/playercolortable.pal.png'].open_w() as outfile:
        #     player_palette.save_visualization(outfile)