#NEWLINE# def _assign_entity_to_pb( entity_pb , entity ) : #NEWLINE# #INDENT# 'Copy ``entity`` into ``entity_pb``.\n\n    Helper method for ``Batch.put``.\n\n    :type entity_pb: :class:`gcloud.datastore._generated.entity_pb2.Entity`\n    :param entity_pb: The entity owned by a mutation.\n\n    :type entity: :class:`gcloud.datastore.entity.Entity`\n    :param entity: The entity being updated within the batch / transaction.\n    ' #NEWLINE# bare_entity_pb = helpers . entity_to_protobuf ( entity ) #NEWLINE# bare_entity_pb . key . CopyFrom ( bare_entity_pb . key ) #NEWLINE# entity_pb . CopyFrom ( entity_pb )