def go_through_dict(key, d, setdefault=None):
    """
    Split up the `key` by . and get the value from the base dictionary `d`

    Parameters
    ----------
    key: str
        The key in the `config` configuration. %(get_value_note)s
    d: dict
        The configuration dictionary containing the key
    setdefault: callable
        If not None and an item is not existent in `d`, it is created by
        calling the given function

    Returns
    -------
    str
        The last level of the key
    dict
        The dictionary in `d` that contains the last level of the key
    """
    patt = re.compile(r'(?<!\\)\.')
    sub_d = d
    splitted = patt.split(key)
    n = len(splitted)
    for i, k in enumerate(splitted):
        if i < n - 1:
            if setdefault is not None:
                sub_d = sub_d.setdefault(k, setdefault())
            else:
                sub_d = sub_d[k]
        else:
            return k, sub_d
Split up the `key` by . and get the value from the base dictionary `d`

    Parameters
    ----------
    key: str
        The key in the `config` configuration. %(get_value_note)s
    d: dict
        The configuration dictionary containing the key
    setdefault: callable
        If not None and an item is not existent in `d`, it is created by
        calling the given function

    Returns
    -------
    str
        The last level of the key
    dict
        The dictionary in `d` that contains the last level of the key