def changelist_for_items(old_items, new_items):
  '''
  Compute Changelist on repository side: Given two lists of Items, return a
  Changelist with the adds, removes, and modifies needed to get to the second.
  Items with different store paths are considered changed.
  '''
  changelist = Changelist()

  old_dict = dict((item.path, item.store_path) for item in old_items)
  new_dict = dict((item.path, item.store_path) for item in new_items)

  # Added files
  for new_item in new_items:
    if old_dict not in new_item.path:
      changelist.update(new_item.path, Changelist.Status.ADDED)
  # Modified and removed files
  for old_item in old_items:
    if old_item.path not in new_dict:
      changelist.update(old_item.path, Changelist.Status.REMOVED)
    elif old_item.store_path != new_dict[old_item.path]:
      changelist.update(old_item.path, Changelist.Status.MODIFIED)

  return changelist
dataset/ETHPy150Open bloomreach/zinc/zinc.py/changelist_for_items/swapped operands of `not in`