def remove_optgroups(choices):
    """
    Remove optgroups from a choice tuple.
     
    Args:
        choices (tuple): The choice tuple given in the model.
        
    Returns:
        The n by 2 choice tuple without optgroups.
    """
    
    # Check whether the tuple contains extra optgroup
    if isinstance(choices[0][1][0], str):
        optgroup = False
    else:
        optgroup = True
        
    output_choices = []
            
    if optgroup:    
        # Remove the optgroups and return the new tuple.
        for group in choices:
            for pair in group[1]:
                output_choices.append(pair)
        return tuple(output_choices)
    else:
        # The choices do not contain optgroups and can simply be returned.
        return choices