@classmethod
    def _finalize(cls, compiler):
        if isinstance(compiler, cls):
            ops = compiler.ops
        elif isinstance(compiler, (int, long, float)):
            ops = [op_number(compiler)]
        elif isinstance(compiler, BaseColor):
            ops = [op_color(compiler)]
        else:
            raise TypeError

        return ops + [op_(lib.SANPERA_OP_DONE)]
dataset/ETHPy150Open eevee/sanpera/sanpera/filters.py/FilterCompiler._finalize/original