(block, op_name)
Filter given block returning statements with specific expressions
Filter given block returning statements with specific expressions
Filter given block returning statements with specific expressions
def find_operations(block, op_name):
    """
    Filter given block returning statements with specific expressions
    """

    for assign in filter_block_statements(block, Assign):
        rhs = assign.value
        if isinstance(rhs, Expr) and rhs.op == op_name:
            yield assign
def find_operations ( block , op_name ) : for assign in filter_block_statements ( block , Assign ) : rhs = assign . value if isinstance ( rhs , Expr ) and rhs . op == op_name : yield assign