def METHOD_NAME(pks: list[int]) -> None:
    q = Agent.objects.filter(pk__in=pks)
    agents = [i for i in q if pyver.parse(i.version) >= pyver.parse("1.3.0")]
    chunks = (agents[i : i + 40] for i in range(0, len(agents), 40))
    for chunk in chunks:
        for agent in chunk:
            agent.delete_superseded_updates()
            with suppress(Exception):
                agent.approve_updates()
            nats_data = {
                "func": "installwinupdates",
                "guids": agent.get_approved_update_guids(),
            }
            asyncio.run(agent.nats_cmd(nats_data, wait=False))
        time.sleep(1)