<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def Majority(*xs, simplify=True, conj=False):
 """ Return an expression that means "the majority of input functions are true". If *simplify* is ``True``, return a simplified expression. If *conj* is ``True``, return a CNF. Otherwise, return a DNF. """

    xs = [Expression.box(x).node for x in xs]
    if conj:
        terms = list()
        for _xs in itertools.combinations(xs, (len(xs) + 1) // 2):
            terms.append(exprnode.or_(*_xs))
        y = exprnode.and_(*terms)
    else:
        terms = list()
        for _xs in itertools.combinations(xs, len(xs) // 2 + 1):
            terms.append(exprnode.and_(*_xs))
        y = exprnode.or_(*terms)
    if simplify:
        y = y.simplify()
    return _expr(y)