What is the way to programmatically retrieve the list of Drush commands defined by core or contributed modules in a custom Drupal 9 or Drupal 10 module?
For example: I have a custom module and now I want to get the list of all the drush commands in my custom module defined by other modules whether they are part of Drupal core or contributed modules.
Thanks