def METHOD_NAME(d, key=None):
    """Generate tuples of key in dotted string format and value from nested dict.
    Parameters
    ----------
    d : dict
        A mapping instance with nested dicts, e.g. {'a': {'b': 'c'}}.
    key : str
        Key of root at current point in the recursion, used to
        build up nested keys in the top-level dict through
        multiple recursive calls (Default value = None).
    Yields
    ------
    tuple
        Tuples of dotted key and values e.g. ('a.b', 'c')
    """
    if isinstance(d, Mapping):
        if d:
            for k in d:
                k_ = k if key is None else ".".join((key, k))
                yield from METHOD_NAME(d[k], key=k_)
        elif key is not None:
            yield key, d
    else:
        if type(d) is list:
            d = _to_hashable(d)
        yield key, d