def METHOD_NAME(
    entry_point_name: str,
    entry_point_values_by_group: dict[str, list[str]],
    plugin_distro: metadata.Distribution,
) -> Callable[..., list[metadata.EntryPoint]]:
    by_group = {
        key: [
            EntryPoint(  # type: ignore[no-untyped-call]
                name=entry_point_name,
                group=key,
                value=value,
            )._for(  # type: ignore[attr-defined]
                plugin_distro
            )
            for value in values
        ]
        for key, values in entry_point_values_by_group.items()
    }
    def _entry_points(**params: Any) -> list[metadata.EntryPoint]:
        group = params.get("group")
        if group not in by_group:
            return []
        eps: list[metadata.EntryPoint] = by_group[group]
        return eps
    return _entry_points