code: def rtril(M, diagonal=0, upper=False):
      """Takes the lower-triangular of the rightmost 2 dimensions."""
      if upper:
          return rtril(M, diagonal=diagonal, upper=False).transpose(
              -1, -2
          )
      return M * torch.tril(
          torch.ones(M.shape[-2], M.shape[-1]), diagonal=diagonal
      )
  
file_path: pyro/pyro/contrib/util.py
imports: import weakref
  from collections import OrderedDict
  import torch
  import pyro
label_desc: Use image node_id 9 for calling a global function with example usage: rtril(M, diagonal, upper) and returns: unknown, rtril