Contains helpers that are applied to collections.
This is similar in concept to the collections module.
 
 A registry that acts like a dictionary but searches for other classes in the MRO if the original class is not found.
Source code in vllm/utils/collection_utils.py
  
  Bases: Mapping[str, T], Generic[T]
Evaluates dictionary items only when they are accessed.
Adapted from: https://stackoverflow.com/a/47212782/5082708
Source code in vllm/utils/collection_utils.py
  
    
    
    
    
  Unlike itertools.groupby, groups are not broken by non-contiguous data.
Source code in vllm/utils/collection_utils.py
  
 is_list_of(
    value: object,
    typ: type[T] | tuple[type[T], ...],
    *,
    check: Literal["first", "all"] = "first",
) -> TypeIs[list[T]]
Source code in vllm/utils/collection_utils.py
  
  Swap values between two keys.