def HandleRepairStatus(line_parts):
  """Given turn line_parts into a set of notes about the repair job.

  Args:
    line_parts: Iterable of ExtractLabStatusParts() results.

  Returns:
    Set of single word strings which describe a given repair job.
  """
  repair_notes = set()

  noop = True  # Did this repair job perform any actual repair?

  for _, result, task, notes in line_parts:
    # If we get no failures, other than the servo connection, we did no repair
    # work.
    if result not in (None, 'GOOD') and task != 'verify.servod':
      noop = False

    # If we ran the repair.usb task, we tried to do a USB based repair.
    if task == 'repair.usb':
      repair_notes.add('USB')

    if (result == 'FAIL' and task == 'verify.ssh' and
        notes.startswith('No answer to ping')):
      repair_notes.add('NetworkWasDown')

  if noop:
    repair_notes.add('NoRepairNeeded')

  return repair_notes