Transforms the raw groups info response from the API into a structured format.

This function takes the raw API response for groups and maps it to a structured array of ESPRMGroupInterface objects. It ensures that fields like node details and sub-groups are properly transformed and included in the result.