def get_installed_targets():
        """! @brief Return a list of CmsisPackDevice objects for installed pack targets."""
        try:
            cache = cmsis_pack_manager.Cache(True, True)
            results = []
            for pack in ManagedPacks.get_installed_packs(cache=cache):
                pack_path = os.path.join(cache.data_path, pack.get_pack_name())
                pack = CmsisPack(pack_path)
                results += list(pack.devices)
            return sorted(results, key=lambda dev:dev.part_number)
        except FileNotFoundError:
            # cmsis-pack-manager can raise this exception if the cache is empty.
            pass
! @brief Return a list of CmsisPackDevice objects for installed pack targets.