def process_assignments(mtc, hit_id):
  results = []
  assignments = mtc.get_assignments(hit_id)
  for a in assignments:
    if ['Approved', 'Submitted'] in a.AssignmentStatus:
      try:
        output = json.loads(a.answers[0][0].fields[0])
      except ValueError as e:
        print >> sys.stderr, ('Bad data from assignment %s (worker %s)'
            % (a.AssignmentId, a.WorkerId))
        continue
      results.append({
        'assignment_id': a.AssignmentId,
        'hit_id': hit_id,
        'worker_id': a.WorkerId,
        'output': json.loads(a.answers[0][0].fields[0]),
      })
  return results
dataset/ETHPy150Open jcjohnson/simple-amt/get_results.py/process_assignments/swapped operands of `in`