<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _between(expr, left, right, inclusive=True):
 """ Return a boolean sequence or scalar show whether each element is between `left` and `right`. :param expr: sequence or scalar :param left: left value :param right: right value :param inclusive: if true, will be left <= expr <= right, else will be left < expr < right :return: boolean sequence or scalar """


    if isinstance(expr, SequenceExpr):
        return Between(_input=expr, _left=left, _right=right,
                       _inclusive=inclusive, _data_type=types.boolean)
    elif isinstance(expr, Scalar):
        return Between(_input=expr, _left=left, _right=right,
                       _inclusive=inclusive, _value_type=types.boolean)