The main goal here is to add a new code path for generating previews for node groups. It's not really possible to generate meaningful previews for node groups automatically in the general case. Therefore, we need some fallback that produces an image that is at least not completely unrelated to the asset. The current state of the patch just writes the name of the asset into the preview.
Alternatively we could have a predefined image that is shown when a node group has no preview. Then we could just show that instead of generating mostly-useless thumbnails.
Other more sophisticated methods for generating previews for node groups are discussed in T92811 and T93754.
Current master:
This patch:
I need help from some designer for a better looking fallback preview.

