class_docstr: Synchronizes a stream to another stream.
  
  Place it just before you want to start an operation on the next stream,
  provided that all operations on the previous stream are done.
code: def backward(
      ctx: Context,
      *grad_input: Tensor,
  ) -> Tuple[Optional[Tensor], ...]:
      prev_stream = ctx.prev_stream
      next_stream = ctx.next_stream
  
      wait_stream(prev_stream, next_stream)
  
      grad_streams: Tuple[Optional[Tensor], ...] = (None, None)
      return grad_streams + grad_input
  
file_path: fairscale/fairscale/nn/pipe/copy.py
imports: from collections import deque
  from typing import Deque, List, Optional, Tuple
  import torch
  from torch import Tensor
  from .stream import AbstractStream, current_stream, get_device, record_stream, use_stream, wait_stream
label_desc: Use image node_id 2 for calling the Wait obj's underlying member method code with example usage: obj.backward(ctx) and returns: unknown