def _Compile(self, qfilter, level):
    if not (isinstance(qfilter, (list, tuple)) and qfilter):
      raise errors.ParameterError("Invalid filter on level %s" % level)

    # Limit recursion
    if level >= self._LEVELS_MAX:
      raise errors.ParameterError("Only up to %s levels are allowed (filter"
                                  " nested too deep)" % self._LEVELS_MAX)

    # Create copy to be modified
    operands = qfilter[:]
    op = operands.pop(0)

    try:
      (kind, op_data) = self._OPS[op]
    except KeyError:
      raise errors.ParameterError("Unknown operator '%s'" % op)

    (handler, hints_cb) = self._op_handler[kind]

    return handler(hints_cb, level, op, op_data, operands)
Initialize an mboxMMDFMessage instance.
dataset/ETHPy150Open ganeti/ganeti/lib/query.py/_FilterCompilerHelper._Compile--crossover with--dataset/ETHPy150Open babble/babble/include/jython/Lib/mailbox.py/_mboxMMDFMessage.__init__