Filtering over entity types
In the following query based on this example
Is there some way to filter the entities the variable
Is there some way to filter the entities the variable
$entity-type would range over? For example is there a way to say I want the variable $entity-type to range over entities books and its subtypes or entities specified in a list?