def check_multi_location(alignment, tags, log=None):
    """
    See if the read was mapped at multiple locations.
    if so, it returns True and can be counted in the optional log

    :param alignment: the read
    :param tags: alignment tags as dict
    :return:
    """
    if 'XA' in tags:
        alignment.is_qcfail = True
        if log:
            log.multi(alignment)
        return True
    else:
        return False