class_docstr: A portal for a tensor.
class_docstr_tok: ["A","portal","for","a","tensor","."]
docstr: Stores a gradient into this portal.
docstr_tok: ["Stores","a","gradient","into","this","portal","."]
code: def put_grad(self, grad: Tensor) -> None:
      """Stores a gradient into this portal."""
      if hasattr(self, "pipeline"):
          self.pipeline.send_portal_grad(self.ns_name, self.index, grad)
      self.grad = grad
  
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 9 for calling the Portal obj's underlying member method code with example usage: obj.put_grad(grad) without return types