original_docstring: Calculate the number of writes required to maintain a specific Index.
  
    Args:
      index: The composite index.
      unique_old_properties: Dictionary mapping property names to a set of props
        present on the old entity.
      unique_new_properties: Dictionary mapping property names to a set of props
        present on the new entity.
      common_properties: Dictionary mapping property names to the number of
        properties with that name that are present on both the old and new
        entities.
  
    Returns:
      The number of writes required to maintained the provided index.
    
docstring: Calculate the number of writes required to maintain a specific Index.
docstring_tokens: Calculate the number of writes required to maintain a specific Index .
code: def _CalculateWritesForCompositeIndex(index, unique_old_properties,
                                        unique_new_properties,
                                        common_properties):
    """Calculate the number of writes required to maintain a specific Index.
  
    Args:
      index: The composite index.
      unique_old_properties: Dictionary mapping property names to a set of props
        present on the old entity.
      unique_new_properties: Dictionary mapping property names to a set of props
        present on the new entity.
      common_properties: Dictionary mapping property names to the number of
        properties with that name that are present on both the old and new
        entities.
  
    Returns:
      The number of writes required to maintained the provided index.
    """
    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)
code_tokens: 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 )
short_docstring: Calculate the number of writes required to maintain a specific Index.
short_docstring_tokens: Calculate the number of writes required to maintain a specific Index .
comment: """Calculate the number of writes required to maintain a specific Index.
  
    Args:
      index: The composite index.
      unique_old_properties: Dictionary mapping property names to a set of props
        present on the old entity.
      unique_new_properties: Dictionary mapping property names to a set of props
        present on the new entity.
      common_properties: Dictionary mapping property names to the number of
        properties with that name that are present on both the old and new
        entities.
  
    Returns:
      The number of writes required to maintained the provided index.
    """