code: def get_command_class(name, exclude_packages=None, exclude_command_class=None):
      
      from django.conf import settings
      return get_command_class_from_apps(
          name, 
          settings.INSTALLED_APPS \
              if "django.core" in settings.INSTALLED_APPS \
              else ("django.core",) + tuple(settings.INSTALLED_APPS),
          exclude_packages=exclude_packages,
          exclude_command_class=exclude_command_class)
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.