def indeterminate(seg):
if seg._uploaded:<EOL><INDENT>if seg.explicit:<EOL><INDENT>assert seg._marked is False<EOL><DEDENT>else:<EOL><INDENT>assert seg._marked is True<EOL><DEDENT><DEDENT>else:<EOL><INDENT>assert seg._marked is False<EOL><DEDENT>return True<EOL>
Returns true as long as the segment is internally consistent.

    Checks invariants of mark_done, depending on whether the segment
    has been uploaded.  This is useful in cases with tests with
    failures and concurrent execution, and calls out the state of the
    segment in any case to the reader.