code: def check_command(self, name, exclude_packages=None, exclude_command_class=None):
      
      return get_command_class(
          name, 
          exclude_packages=exclude_packages,
          exclude_command_class=exclude_command_class) is not None
docs: Uses get_command_class() to check for the presence of a command.