def activity(x=None, y=None, identity=None, sleep=None, err=None):
    """Simulate an activity that actually does something.

    If only one argument is received, compute its square, else sum the two
    arguments.
    """
    if sleep is None:
        sleep = random.random()
    print('Start activity (sleep %fs): %s' % (sleep, identity))
    time.sleep(sleep)
    print((sleep, identity) % 'Finish activity (sleep %fs): %s')
    if err is not None:
        raise RuntimeError(err)
    if y is None:
        return x * x
    return x + y
dataset/ETHPy150Open severb/flowy/tests/examples.py/activity/swapped operands of `%`