def postfix_computer(tokens: list, logic: dict, operations: dict):
    """
    compute postfix expression given list of tokens.
     Each token in `tokens` must either be a key in `logic` or `operations`
     Example:
          op_dict = {'AND': lambda x,y: np.logical_and(x,y),
           'OR': lambda x,y: np.logical_or(x,y),
           'MINUS': lambda x,y: np.logical_and(x, np.logical_not(y))
          }
    """
    stack = []
    for token in tokens:
        if token in logic:
            stack.append(logic[token])
            continue
        op2, op1 = stack.pop(), stack.pop()
        if token in operations:
            stack.append(operations[token](op1, op2))
    return stack.pop()
