#NEWLINE# def get_assignment( self , assignment_id ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return ( self . connection . get_assignment ( assignment_id ) [ 0 ] , True ) #NEWLINE# #UNINDENT# except MTurkRequestError as e : #NEWLINE# #INDENT# error = e . errors [ 0 ] [ 0 ] #NEWLINE# if ( e == 'AWS.MechanicalTurk.InvalidAssignmentState' ) : #NEWLINE# #INDENT# return ( assignment_id , False ) #NEWLINE# #UNINDENT# return ( None , False )