from typing import ChainMap


def merge_gloss_into_example(glosses, example_row):
    """Add IGT to an example.

    :arg glosses: dictionary `example id` -> `gloss`
    :arg example_row: CLDF example.
    """
    if example_row['ID'] in glosses:
        return ChainMap(glosses[example_row['ID']]['example'], example_row)
    return example_row