<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def op(token, func, left=False, right=False):
 """op provides a more verbose syntax for declaring operators. :param token: The string token of the operator. Usually a single character. :param func: A callable used to evaluate its arguments. Where the operator is both-sided the callable should accept two arguments. Where it is one-sided it should accept one argument. :param left: A boolean indicating whether the operator applies to the expression to the left of it. :param right: A boolean indicating whether the operator applies to the expression to the right of it. :returns: a tuple (token, func, side) where side is OP_BOTH if left and right (or neither) and OP_LEFT if left, otherwise OP_RIGHT. """

    both = (left == right)
    return (token, func, OP_BOTH if both else OP_LEFT if left else OP_RIGHT)