code: def sort(
      tuples: Collection[Tuple[_T, _T]],
      allitems: Collection[_T],
      deterministic_order: bool = True,
  ) -> Iterator[_T]:
      """sort the given list of items by dependency.
  
      'tuples' is a list of tuples representing a partial ordering.
  
      deterministic_order is no longer used, the order is now always
      deterministic given the order of "allitems".    the flag is there
      for backwards compatibility with Alembic.
  
      """
  
      for set_ in sort_as_subsets(tuples, allitems):
          yield from set_
  
file_path: sqlalchemy/lib/sqlalchemy/util/topological.py
imports: from __future__ import annotations
  from typing import Any
  from typing import Collection
  from typing import DefaultDict
  from typing import Iterable
  from typing import Iterator
  from typing import Sequence
  from typing import Set
  from typing import Tuple
  from typing import TypeVar
  from ..None import util
  from ..exc import CircularDependencyError
label_desc: Use image node_id 2 for calling a global function with example usage: sort(tuples, allitems, deterministic_order) without return types