def _CalculateWriteOps(composite_indexes, old_entity, new_entity):
 if ((old_entity is not None) and (old_entity.property_list() == new_entity.property_list()) and (old_entity.raw_property_list() == new_entity.raw_property_list())):
  return (0, 0)
 index_writes = _ChangedIndexRows(composite_indexes, old_entity, new_entity)
 if (old_entity is None):
  index_writes += 1
 return (1, index_writes)

def _CalculateWriteOps ( composite_indexes , old_entity , new_entity ) : if ( ( old_entity is not None ) and ( old_entity . property_list ( ) == new_entity . property_list ( ) ) and ( old_entity . raw_property_list ( ) == new_entity . raw_property_list ( ) ) ) : return ( 0 , 0 ) index_writes = _ChangedIndexRows ( composite_indexes , old_entity , new_entity ) if ( old_entity is None ) : index_writes += 1 return ( 1 , index_writes )
determines number of entity and index writes needed to write new_entity .