code: def sort_by_priority(
      self,
      now: float,
      seq_groups: List[SequenceGroup],
  ) -> List[SequenceGroup]:
      return sorted(
          seq_groups,
          key=lambda seq_group: self.get_priority(now, seq_group),
          reverse=True,
      )
  
file_path: BigDL/python/llm/src/bigdl/llm/vllm/core/policy.py
imports: from typing import List
  from bigdl.llm.vllm.sequence import SequenceGroup
  from bigdl.llm.utils.common import invalidInputError
label_desc: Use image node_id 2 for calling the Policy obj's underlying member method code with example usage: obj.sort_by_priority(now, seq_groups) and returns: sorted