def get_group_policy_names(iam_client, groups):
    """
    Returns the group policy names of the current user

    Args:
        iam_client (obj): IAM client obj
        groups (list): User groups

    Returns:
        policy_names (list): List of group policy names the current user has
    """
    policy_names = []
    for group in groups:
        group_policy_names = iam_client.list_group_policies(GroupName=group['GroupName'])['PolicyNames']
        policy_names += group_policy_names

    return policy_names