Add an item to a list if it doesn't exist.

def set_add(parent, idx, value):
  """Add an item to a list if it doesn't exist."""
  lst = get_child(parent, idx)
  if value not in lst:
    lst.append(value)