def parse_preference_name(name):
    """
    Split a preference name into a base and end name.
    
    Parameters
    ----------
    name : str
        The full name of the preference.
    
    Returns
    -------        
    basename : str
        The first part of the name up to the final ``.``.
    endname : str
        The last part of the name from the final ``.`` onwards.
    
    Examples
    --------
    >>> parse_preference_name('core.default_float_dtype')
    ('core', 'default_float_dtype')
    >>> parse_preference_name('codegen.cpp.compiler')
    ('codegen.cpp', 'compiler')
    """
    # parse the name
    parts = name.split('.')
    basename = '.'.join(parts[:-1])
    endname = parts[-1]
    return basename, endname