def UpdateIterable(o, ki, value=None, default=None, op=None):
  if default is not None and ki not in o:
    o[ki] = default

  if op is not None:
    new_v = op(o[ki], value)
    if new_v is not None:
      value = new_v
    else:
      value = None

  if value is not None:
    o[ki] = value
Update iteratable object 'o' at [Key or Index].
dataset/ETHPy150Open google/simian/src/simian/mac/munki/plist.py/UpdateIterable