code: def is_cuda(stream: Optional[AbstractStream]) -> bool:
      """Returns ``True`` if the given stream is a valid CUDA stream."""
      return stream is not CPUStream
  
file_path: fairscale/fairscale/nn/pipe/stream.py
imports: from contextlib import contextmanager
  from typing import Generator, List, Optional, Union, cast
  import torch
label_desc: Use image node_id 9 for calling a global function with example usage: is_cuda(stream) and returns: unknown