code: def get_command_and_defaults(name, exclude_packages=None, exclude_command_class=None):
      
      command = get_command_class(name,
          exclude_packages=exclude_packages,
          exclude_command_class=exclude_command_class)
      defaults = {}
      if command is not None:
          command = command()
          defaults = command.get_option_defaults() \
              if isinstance(command, Command) \
              else get_option_defaults(command)
      return (command, defaults)
docs: Searches "django.core" and the apps in settings.INSTALLED_APPS to find the
      named command class, optionally skipping packages or a particular command
      class. Gathers the command's default options and returns the command and
      options dictionary as a two-tuple: (command, options). Returns (None, {})
      if the command class could not be found.