def get_events_restricted(phylo, opt):
    """
    Infer gain/loss where events are restricted to target gain and query loss.
    """
    in_mrca = phylo.get_label_at_root()
    orth_str = 'ambiguous'
    if in_mrca == 0:
        orth_str = 'gain_{}'.format(opt.qname)
    elif in_mrca == 1:
        orth_str = 'loss_{}'.format(opt.tname)
    return orth_str
