def METHOD_NAME():
    m1 = ParamTestModel()
    m2 = ParamTestModel()
    optimizer = torch.optim.Adam(m1.parameters(), lr=0.01)
    current_order = list(m2.parameters())
    module_surgery.update_params_in_optimizer(old_params=m1.parameters(),
                                              new_params=m2.parameters(),
                                              optimizers=optimizer)
    post_replacement_order = optimizer.param_groups[0]['params']
    for idx, value in enumerate(current_order):
        assert torch.all(value.eq(post_replacement_order[idx]))