i would store the variables we need here:
```
$parent_id = $entity->get_parent_id();
$language = $entity->get_language();
```
Then use the simpler variables in the places needed below instead of the entity->get_xxx()