def apply_item_changes(lib, item, move, pretend, write):
    """Store, move and write the item according to the arguments.
    """
    if not pretend:
        # Move the item if it's in the library.
        if move and util.ancestry(item.path) in lib.directory:
            item.move(with_album=False)

        if write:
            item.try_write()
        item.store()
dataset/ETHPy150Open beetbox/beets/beetsplug/mbsync.py/apply_item_changes/swapped operands of `in`