code: def stream(stream: Stream) -> AbstractContextManager:
      r"""Wrapper around the Context-manager StreamContext that
      selects a given stream.
  
      N.B. This function only exists to facilitate device-agnostic code
      """
      return StreamContext(stream)
  
imports: from contextlib import AbstractContextManager
  from typing import Any, Optional, Union
  import torch
  from ..None import device
  from .None import amp
label_desc: Use image node_id 5 for calling a global function with example usage: stream(stream) and returns: StreamContext