def merge_func(op1, op2):
    'Artificial example where a CZ will absorb any merge-able operation.'
    for op in [op1, op2]:
        if (op.gate == cirq.CZ):
            return op
    return None
Artificial example where a CZ will absorb any merge-able operation.
def merge_func(op1, op2):
    
    for op in [op1, op2]:
        if (op.gate == cirq.CZ):
            return op
    return None