def test_trainable_parameters_changed(trainer):
    """Performs a training step and verifies that at least one parameter 
    in every trainable layer has changed."""
    print("At least one parameter changed in the trainable layers", end="")
    passed, msg = True, ""

    trainer.fit(epochs=1, max_steps=1, max_eval_steps=0)
    
    for name, new_param in trainer.model.named_parameters():
        if new_param.requires_grad:
            old_param = trainer._saved_state["model"][name]
            if not (new_param.data != old_param).any():
                msg += "    expected changes in: %s\n" % name
                passed = False

    return passed, msg