device. However, the callback will be invoked with some
      dedicated streams set as current (fetched from a global pool)
      which will be synchronized with those kernels. Hence any
      operation performed by the callback on these tensors will be
      scheduled on the device after the kernels complete. In other
      words, as long as the callback doesn't switch streams, it can
      safely manipulate the result without any additional
      synchronization. This is similar to the non-blocking behavior of
      "wait()".
  Similarly, if the callback returns a value that contains tensors
  that reside on a GPU, it can do so even if the kernels that are
  producing these tensors are still running on the device, as long
  as the callback didn't change streams during its execution. If
  one wants to change streams, one must be careful to re-
  synchronize them with the original streams, that is, those that
  were current when the callback was invoked.

  Parameters:
