<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def angle_diff(start_a=[0.0], end_a=[0.0], direction=True):
    '''Return difference in angle from start_a to end_a.
Direction follows the right-hand-rule so positive is counter-clockwise.
    '''
    assert isinstance(start_a, list)
    assert isinstance(end_a, list)
    l_angle = len(start_a)
    assert l_angle > 0
    assert l_angle == len(end_a)
    for i in start_a:
        assert isinstance(i, float)
        assert abs(i) <= 2*pi
    for i in end_a:
        assert isinstance(i, float)
        assert abs(i) <= 2*pi
    assert isinstance(direction, bool)

    # Convert True/False to 1/-1
    inv = 2 * int(direction) - 1

    diff = [end_a[i] - start_a[i] for i in range(l_angle)]
    diff = [(2*pi + d) if d < 0.0 else d for d in diff]
    return [d*inv for d in diff]