/**
 * Implements hook_entity_preload().
 */
function {{ machine_name }}_entity_preload(array $ids, $entity_type_id) {
  $entities = [];

  foreach ($ids as $id) {
    $entities[] = mymodule_swap_revision($id);
  }

  return $entities;
}
