def check_region(region: str):
    """Checks and validates region from config.
    Regions can only be 'EUR', 'JAP', or 'USA', as defined by
    Dolphin Emulator.

    Args:
        region (str): the geographic region of the game's saves

    Returns:
        str: region, if valid

    Raises:
        Exception: if the config region is invalid

    """
    if region == 'EUR' or region == 'JAP' or region == 'USA':
        return region
    elif region == 'E':
        return 'EUR'
    elif region == 'J':
        return 'JAP'
    elif region == 'U':
        return 'USA'
    else:
        raise Exception(f'{region} is an invalid region!')