code: def discretize_beta_pdf(bins, gamma, delta):
      """
      discretized version of the Beta pdf used for approximately integrating via Search
      """
      shape_alpha = gamma * delta
      shape_beta = (1.0 - gamma) * delta
      return torch.tensor(
          list(
              map(
                  lambda x: (x ** (shape_alpha - 1))
                  * ((1.0 - x) ** (shape_beta - 1)),
                  bins,
              )
          )
      )
  
file_path: pyro/examples/rsa/generics.py
imports: import argparse
  import collections
  import numbers
  import torch
  from search_inference import HashingMarginal, Search, memoize
  import pyro
  import pyro.distributions
  import pyro.poutine
label_desc: Use image node_id 2 for calling a global function with example usage: discretize_beta_pdf(bins, gamma, delta) and returns: torch