def is_operator_or_getitem(expr):
    """true if expr is unary or binary operator or getitem"""
    return (isinstance(expr, ir.Expr)
            and getattr(expr, 'op', False)
            and expr.op in ['unary', 'binop', 'inplace_binop', 'getitem', 'static_getitem'])
true if expr is unary or binary operator or getitem
numba/core/ir_utils.py