from typing import Dict
from typing import List
from typing import Tuple


def edgenerator(
    image_and_parents: Dict[str, List[str]]
) -> List[Tuple[str, str]]:
    """Iterates over the parents_by_image dict, and returns a list of tuples -
    each tuple represents the child and parent nodes. If a node has more than one
    parent, it shall be represented with multiple tuples.
    For a list ['a', 'b', 'c'], will return [('a', 'b'), ('b', 'c')]."""
    return [
        (node, parent)
        for node, parents in image_and_parents.items()
        for parent in parents
    ]