Currently the only option is to call the Expand/Collapse groups API, which takes noticable time to execute.