code: def check_command(self, name):
          
          if not check_command(
              name, 
              exclude_packages=self.get_exclude_packages(),
              exclude_command_class=self.__class__):
              raise management.CommandError(
                  "The management command \"{name:s}\" is not available. "
                  "Please ensure that you've added the application with "
                  "the \"{name:s}\" command to your INSTALLED_APPS "
                  "setting".format(
                      name=name))
docs: Checks whether the given Django management command exists, excluding
          this command from the search.