Where are examples of creating animation with UAnimDataController?

I need to create an animation from scratch. All of the code I have is deprecated now, and a lot of it says I should use UAnimDataController. Where can I find good example code or at least documentation more than definitions, for that?

UE_DEPRECATED(5.0, “Public access to SequenceLength is deprecated, use GetPlayLength or UAnimDataController::SetPlayLength instead”)
UPROPERTY(Category=Length, AssetRegistrySearchable, VisibleAnywhere, BlueprintReadOnly)
float SequenceLength;

So, I use it like this

//before:
//Ue 5.1
Montage->SetPlayLength(NewSequence->GetPlayLength());
//after:
//in 5.3
Montage->GetController().SetPlayLength(NewSequence->GetPlayLength());

https://dev.epicgames.com/documentation/en-us/unreal-engine/BlueprintAPI/Utilities/Casting/CastToAnimationDataController?application_version=5.4
https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Developer/AnimationDataController/UAnimDataController?application_version=5.4