code: def rexpand(A, *dimensions):
      """Expand tensor, adding new dimensions on right."""
      return A.view(A.shape + (1,) * len(dimensions)).expand(
          A.shape + tuple(dimensions)
      )
  
file_path: pyro/pyro/contrib/util.py
imports: import weakref
  from collections import OrderedDict
  import torch
  import pyro
label_desc: Use image node_id 7 for calling a global function with example usage: rexpand(A) and returns: A