def mosaic_name(pairs_param):
    """
    Generates a filename for the mosaic. Concatenating the pair names would be very long so instead we combine the last
    four numbers of the product_id's.
    """
    return ''.join(
        [
            f'{pair["left"][-5:-1]}-{pair["right"][-5:-1]}_'
            for pair in pairs_param
        ]
    )[:-1]