[PATCH 1/8] dm: core: Add a helper to retrieve devices through graph endpoints