def METHOD_NAME(self, share_params) -> None:
    weight_optimizer_kwargs = {"lr": 1.0}
    bias_optimizer_kwargs = {"lr": 0.5}
    model = nn.Sequential(nn.Linear(10, 10), nn.Linear(10, 10))
    if share_params:
        model[0].weight = model[1].weight
    # Use different optimizers for weights & biases.
    weights = [m.weight for m in model]
    biases = [m.bias for m in model]
    optim_weight = torch.optim.SGD(weights, **weight_optimizer_kwargs)
    optim_bias = torch.optim.SGD(biases, **bias_optimizer_kwargs)
    model_with_opt_in_bwd = deepcopy(model)
    # Apply different optimizer in backwards for weights and biases.
    _apply_optimizer_in_backward(
        torch.optim.SGD,
        [m.weight for m in model_with_opt_in_bwd],
        optimizer_kwargs=weight_optimizer_kwargs,
    )
    _apply_optimizer_in_backward(
        torch.optim.SGD,
        [m.bias for m in model_with_opt_in_bwd],
        optimizer_kwargs=bias_optimizer_kwargs,
    )
    _validate_params(
        [
            model.parameters(),
            model_with_opt_in_bwd.parameters(),
        ],
        torch.testing.assert_allclose,
    )
    self._run_training_loop_and_validate(
        torch.randn(4, 10),
        [model, model_with_opt_in_bwd],
        [optim_weight, optim_bias],
    )