def flat_iterator(nml):
    """Iterator that returns the adress of an element as a 2-tuple,
    along with the element """
    for key, value in nml.items():
        for inner_key, inner_value in value.items():
            yield (key, inner_key), inner_value
