'Set team configuration.
Arguments:
max_team_size (int): number of users a team can have
membership_team_index (int): index of team user will join
visit_team_index (int): index of team user will visit
create_membership (bool): whether to create membership or not
another_user (bool): another user to visit a team'

def _set_team_configuration_and_membership(self, max_team_size=10, membership_team_index=0, visit_team_index=0, create_membership=True, another_user=False):

    self.set_team_configuration({'course_id': self.course_id, 'max_team_size': max_team_size, 'topics': [self.topic]})
    self.teams = self.create_teams(self.topic, 2)
    if create_membership:
        self.create_membership(self.user_info['username'], self.teams[membership_team_index]['id'])
    if another_user:
        AutoAuthPage(self.browser, course_id=self.course_id).visit()
    self.team_page = TeamPage(self.browser, self.course_id, self.teams[visit_team_index])
