original_docstring: Determines number of entity and index writes needed to write new_entity.
  
    We assume that old_entity represents the current state of the Datastore.
  
    Args:
      composite_indexes: The composite_indexes for the kind of the entities.
      old_entity: Entity representing the current state in the Datstore.
      new_entity: Entity representing the desired state in the Datstore.
  
    Returns:
      A tuple of size 2, where the first value is the number of entity writes and
      the second value is the number of index writes.
    
docstring: Determines number of entity and index writes needed to write new_entity.
  We assume that old_entity represents the current state of the Datastore.
docstring_tokens: Determines number of entity and index writes needed to write new_entity . We assume that old_entity represents the current state of the Datastore .
code: def _CalculateWriteOps(composite_indexes, old_entity, new_entity):
    """Determines number of entity and index writes needed to write new_entity.
  
    We assume that old_entity represents the current state of the Datastore.
  
    Args:
      composite_indexes: The composite_indexes for the kind of the entities.
      old_entity: Entity representing the current state in the Datstore.
      new_entity: Entity representing the desired state in the Datstore.
  
    Returns:
      A tuple of size 2, where the first value is the number of entity writes and
      the second value is the number of index writes.
    """
    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
code_tokens: 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
short_docstring: Determines number of entity and index writes needed to write new_entity.
short_docstring_tokens: Determines number of entity and index writes needed to write new_entity .
comment: """Determines number of entity and index writes needed to write new_entity.
  
    We assume that old_entity represents the current state of the Datastore.
  
    Args:
      composite_indexes: The composite_indexes for the kind of the entities.
      old_entity: Entity representing the current state in the Datstore.
      new_entity: Entity representing the desired state in the Datstore.
  
    Returns:
      A tuple of size 2, where the first value is the number of entity writes and
      the second value is the number of index writes.
    """