class_docstr: A portal for a tensor.
class_docstr_tok: ["A","portal","for","a","tensor","."]
docstr: Copies the hidden tensor by a :class:`PortalCopy`.
  
  Give a phony and use the returning phony to keep backpropagation::
  
          +-- PortalCopy --+
          |                |
      -- Fork ---------- Join --
docstr_tok: ["Copies","the","hidden","tensor","by","a",":","class",":","`","PortalCopy","`",".","Give","a","phony","and","use","the","returning","phony","to","keep","backpropagation",":",":","+","--","PortalCopy","--","+","|","|","--","Fork","--","--","--","--","--","Join","--"]
code: def copy(
      self,
      prev_stream: AbstractStream,
      next_stream: AbstractStream,
      phony: Tensor,
  ) -> Tensor:
      """Copies the hidden tensor by a :class:`PortalCopy`.
  
      Give a phony and use the returning phony to keep backpropagation::
  
              +-- PortalCopy --+
              |                |
          -- Fork ---------- Join --
  
      """
      if self.tensor is None:
          return get_phony(torch.device("cpu"), requires_grad=False)
  
      return PortalCopy.apply(self, prev_stream, next_stream, phony)
  
imports: from typing import Any, List, Optional, Tuple
  import torch
  from torch import Tensor
  from .None import Namespace
  from ..copy import Context
  from ..copy import Copy
  from ..phony import get_phony
  from ..stream import AbstractStream, get_device
label_desc: Use image node_id 5 for calling the Portal obj's underlying member method code with example usage: obj.copy(prev_stream, next_stream, phony) and returns: PortalCopy, get_phony