class_docstr: Abstract base class for effect-based guides.
  
  Derived classes must implement the :meth:`get_posterior` method.
class_docstr_tok: ["Abstract","base","class","for","effect-based","guides",".","Derived","classes","must","implement","the",":","meth",":","`","get_posterior","`","method","."]
docstr: For use in :meth:`get_posterior` .
  
  :returns: The value of an upstream sample or deterministic site
  :rtype: torch.Tensor
docstr_tok: ["For","use","in",":","meth",":","`","get_posterior","`",".",":","returns",":","The","value","of","an","upstream","sample","or","deterministic","site",":","rtype",":","torch.Tensor"]
code: def upstream_value(self, name: str) -> Optional[torch.Tensor]:
      """
      For use in :meth:`get_posterior` .
  
      :returns: The value of an upstream sample or deterministic site
      :rtype: torch.Tensor
      """
      return self.trace.nodes[name]["value"]
  
file_path: pyro/pyro/poutine/guide.py
imports: from abc import ABC, abstractmethod
  from typing import TYPE_CHECKING, Callable, Dict, Optional, Tuple, Union
  import torch
  import pyro.distributions
  from pyro.poutine.trace_messenger import TraceMessenger
  from pyro.poutine.trace_struct import Trace
  from pyro.poutine.util import prune_subsample_sites, site_is_subsample
label_desc: Use image node_id 8 for calling the GuideMessenger obj's underlying member method code with example usage: obj.upstream_value(name) and returns: self