Groovy: Check if user is in group

My JIRA setup contains custom field "Team". Also user groups have been created and their names exactly corresponding "Team" values. Based on this assumption I need to check whether the issue assignee belongs to the user group.