def METHOD_NAME(model):
    topology = Topology(
        world_size=dist.get_world_size(),
        local_world_size=dist.get_world_size(),
        compute_device="cuda",
    )
    fused_params = {
        "learning_rate": 1e-1,
        "optimizer": EmbOptimType.ADAM,
        "cache_load_factor": 0.1,
    }
    sharders = [
        EmbeddingBagCollectionSharder(fused_params=fused_params),
        FusedEmbeddingBagCollectionSharder(fused_params=fused_params),
        EmbeddingCollectionSharder(fused_params=fused_params),
    ]
    plan = EmbeddingShardingPlanner(topology=topology, constraints=None).plan(
        model, sharders
    )
    model = DMP(module=model, device=device, plan=plan, sharders=sharders)
    dense_optimizer = KeyedOptimizerWrapper(
        dict(in_backward_optimizer_filter(model.named_parameters())),
        lambda params: torch.optim.Adam(params, lr=1e-1),
    )
    optimizer = CombinedOptimizer([model.fused_optimizer, dense_optimizer])
    return model, optimizer