def compile(expr, **kwargs):
    # TODO: Fix this --> what?
    algebra.reset()
    exprcode = []

    # fixup for legacy usage of compile
    if not hasattr(expr, 'language'):
        assert isinstance(expr, algebra.Sequence) \
            or isinstance(expr, algebra.Parallel)
        assert len(expr.args) == 1
        expr = expr.args[0]

    lang = expr.language()

    if isinstance(expr, Pipelined):
        body = lang.body(expr.compilePipeline(**kwargs))
    else:
        body = lang.body(expr)

    exprcode.append(emit(body))
    return emit(*exprcode)
Compile physical plan to linearized form for execution
dataset/ETHPy150Open uwescience/raco/raco/compile.py/compile