code: private void unmarshalKeyAndParentKey() throws Throwable {
      KeyMetadata keyMetadata = entityMetadata.getKeyMetadata();
      if (keyMetadata != null) {
        MethodHandle writeMethod = keyMetadata.getWriteMethod();
        Key entityKey = (Key) nativeEntity.getKey();
        writeMethod.invoke(entity, new DefaultDatastoreKey(entityKey));
      }
  
      ParentKeyMetadata parentKeyMetadata = entityMetadata.getParentKeyMetadata();
      if (parentKeyMetadata != null) {
        MethodHandle writeMethod = parentKeyMetadata.getWriteMethod();
        Key parentKey = nativeEntity.getKey().getParent();
        if (parentKey != null) {
          writeMethod.invoke(entity, new DefaultDatastoreKey(parentKey));
        }
      }
    }
docs: Unamrshals the entity's key and parent key.
  
  @throws Throwable
  propagated