<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_default_values(section, key, validator=None):
 """Raise an MissingDefaultError if a value in section does not have a default values :param section: the section of a configspec :type section: section :param key: a key of the section :type key: str :param validator: a Validator object to get the default values :type validator: Validator :returns: None :raises: MissingDefaultError Use this in conjunction with the walk method of a ConfigObj. The ConfigObj should be the configspec! When you want to use a custom validator, try:: configinstance.walk(check_default_values, validator=validatorinstance) """

    if validator is None:
        validator = Validator()
    try:
        validator.get_default_value(section[key])
    except KeyError:
        #dv = set(section.default_values.keys())  # set of all defined default values
        #scalars = set(section.scalars)  # set of all keys
        #if dv != scalars:
        parents = get_section_path(section)
        msg = 'The Key %s in the section %s is missing a default: %s' % (key, parents, section[key])
        log.debug(msg)
        raise ConfigError(msg)