async def METHOD_NAME(request: GoStdLibPackagesRequest) -> GoStdLibPackages:
    maybe_race_arg = ["-race"] if request.with_race_detector else []
    list_result = await Get(
        ProcessResult,
        GoSdkProcess(
            # "-find" skips determining dependencies and imports for each package.
            command=("list", *maybe_race_arg, "-json", "std"),
            env={"CGO_ENABLED": "1" if request.cgo_enabled else "0"},
            description="Ask Go for its available import paths",
        ),
    )
    stdlib_packages = {}
    for pkg_json in ijson.items(list_result.stdout, "", multiple_values=True):
        import_path = pkg_json.get("ImportPath")
        pkg_source_path = pkg_json.get("Dir")
        if not import_path or not pkg_source_path:
            continue
        stdlib_packages[import_path] = GoStdLibPackage(
            name=pkg_json.get("Name"),
            import_path=import_path,
            pkg_source_path=pkg_source_path,
            imports=tuple(pkg_json.get("Imports", ())),
            import_map=FrozenDict(pkg_json.get("ImportMap", {})),
            go_files=tuple(pkg_json.get("GoFiles", ())),
            cgo_files=tuple(pkg_json.get("CgoFiles", ())),
            c_files=tuple(pkg_json.get("CFiles", ())),
            cxx_files=tuple(pkg_json.get("CXXFiles", ())),
            m_files=tuple(pkg_json.get("MFiles", ())),
            h_files=tuple(pkg_json.get("HFiles", ())),
            f_files=tuple(pkg_json.get("FFiles", ())),
            s_files=tuple(pkg_json.get("SFiles", ())),
            syso_files=tuple(pkg_json.get("SysoFiles", ())),
            cgo_flags=CGoCompilerFlags(
                cflags=tuple(pkg_json.get("CgoCFLAGS", [])),
                cppflags=tuple(pkg_json.get("CgoCPPFLAGS", [])),
                cxxflags=tuple(pkg_json.get("CgoCXXFLAGS", [])),
                fflags=tuple(pkg_json.get("CgoFFLAGS", [])),
                ldflags=tuple(pkg_json.get("CgoLDFLAGS", [])),
                pkg_config=tuple(pkg_json.get("CgoPkgConfig", [])),
            ),
            embed_patterns=tuple(pkg_json.get("EmbedPatterns", [])),
            embed_files=tuple(pkg_json.get("EmbedFiles", [])),
        )
    return GoStdLibPackages(stdlib_packages)