class_docstr: Base class to inherit for concrete executors such as Celery, Kubernetes, Local, Sequential, etc.
  
  :param parallelism: how many jobs should run at one time. Set to ``0`` for infinity.
class_docstr_tok: ["Base","class","to","inherit","for","concrete","executors","such","as","Celery",",","Kubernetes",",","Local",",","Sequential",",","etc",".",":","param","parallelism",":","how","many","jobs","should","run","at","one","time",".","Set","to","``","0","``","for","infinity","."]
docstr: Orders the queued tasks by priority.
  
  :return: List of tuples from the queued_tasks according to the priority.
docstr_tok: ["Orders","the","queued","tasks","by","priority",".",":","return",":","List","of","tuples","from","the","queued_tasks","according","to","the","priority","."]
code: def order_queued_tasks_by_priority(
      self,
  ) -> list[tuple[TaskInstanceKey, QueuedTaskInstanceType]]:
      """
      Orders the queued tasks by priority.
  
      :return: List of tuples from the queued_tasks according to the priority.
      """
      return sorted(
          self.queued_tasks.items(),
          key=lambda x: x[1][1],
          reverse=True,
      )
  
imports: from __future__ import annotations
  import logging
  import sys
  import warnings
  from collections import defaultdict
  from dataclasses import dataclass, field
  from typing import TYPE_CHECKING, Any, List, Optional, Sequence, Tuple
  import pendulum
  from airflow.cli.cli_config import DefaultHelpParser
  from airflow.configuration import conf
  from airflow.exceptions import RemovedInAirflow3Warning
  from airflow.stats import Stats
  from airflow.utils.log.logging_mixin import LoggingMixin
  from airflow.utils.state import TaskInstanceState
label_desc: Use image node_id 9 for calling the BaseExecutor obj's underlying member method code with example usage: obj.order_queued_tasks_by_priority() and returns: sorted