How to create an Animation Sprite Clip with programmatically created Sprite?

Cross reference of a similar issue: How to spawn a sprite/animated sprite using code?