def calculate_entity_string_size(entity: BaseEntity) -> int:
    """Calculate the actual token size when entity is converted to string for embedding.

    This mimics what happens in entity_processor.py:
    str(entity.to_storage_dict())
    """
    # Get the storage dict and convert to string (same as in entity_processor)
    storage_dict = entity.to_storage_dict()
    entity_string = str(storage_dict)
    return count_tokens(entity_string)
Calculate the actual token size when entity is converted to string for embedding.

    This mimics what happens in entity_processor.py:
    str(entity.to_storage_dict())
    
backend/airweave/platform/transformers/entity_field_chunker.py