private function doesEntityExistInTree(EntityPackage $entity_package, $requirement)
    {
        foreach ($entity_package->getFlattenedRequiredPackages() as $required_entity_package) {
            if ($required_entity_package->getEntityContent()->hasClass($requirement)) {
                return true;
            }
        }
        return false;
    }