def get_all_spdx_keys(licenses):
    """
    Return an iterable of SPDX license keys collected from a `licenses` iterable
    of license objects.
    """
    for lic in licenses.values():
        for spdx_key in lic.spdx_keys():
            yield spdx_key
