def _CalculateWritesForCompositeIndex(index, unique_old_properties, unique_new_properties, common_properties):
 old_count = 1
 new_count = 1
 common_count = 1
 for prop in index.property_list():
  old_count *= len(unique_old_properties[prop.name()])
  new_count *= len(unique_new_properties[prop.name()])
  common_count *= common_properties[prop.name()]
 return ((old_count - common_count) + (new_count - common_count))

def _CalculateWritesForCompositeIndex ( index , unique_old_properties , unique_new_properties , common_properties ) : old_count = 1 new_count = 1 common_count = 1 for prop in index . property_list ( ) : old_count *= len ( unique_old_properties [ prop . name ( ) ] ) new_count *= len ( unique_new_properties [ prop . name ( ) ] ) common_count *= common_properties [ prop . name ( ) ] return ( ( old_count - common_count ) + ( new_count - common_count ) )
calculate the number of writes required to maintain a specific index .