def extend_config(config, default_config):
    """
    default_config must specify all the expected keys. Use the following special
    values for required placeholders:

    * _req_: require a single value (not a list or dict)
    * _req_DICT_: require a dict
    * _req_LIST_: require a list

    Returns:
        AttributeDict
        `config` filled by default values if certain keys are unspecified

    Raises:
        ConfigError if required placeholders are not satisfied
    """
    U.assert_type(config, dict)
    U.assert_type(default_config, dict)
    return Config(_fill_default_config(config, default_config, []))

    default_config must specify all the expected keys. Use the following special
    values for required placeholders:

    * _req_: require a single value (not a list or dict)
    * _req_DICT_: require a dict
    * _req_LIST_: require a list

    Returns:
        AttributeDict
        `config` filled by default values if certain keys are unspecified

    Raises:
        ConfigError if required placeholders are not satisfied
    
surreal/session/config.py