def handle_existing_construct(source, target):
    """Moves the item identifiers and reifier from `source` to
    `target`.

    If the `source` is reifier, `target`'s reifier is set to the
    source reifier unless `target_reifier` is not None. If `source`
    and `target` are reified, the reifiers are merged.

    :param source: the source Topic Maps construct
    :type source: `Construct`
    :param target: the target Topic Maps construct
    :type target: `Construct`
    :param target_reifier: the target's reifier
    :type target_reifier: `Topic` or None

    """
    for iid in source.get_item_identifiers():
        source.item_identifiers.remove(iid)
        target.item_identifiers.add(iid)
    source_reifier = source.get_reifier()
    if source_reifier is None:
        return
    target_reifier = target.get_reifier()
    if target_reifier is not None:
        source.set_reifier(None)
        target_reifier.merge_in(source_reifier)
    else:
        source.set_reifier(None)
        target.set_reifier(source_reifier)
