code: def test_truth():
      true_vals = {
          "probs": torch.tensor(
              [
                  0.0018655171404222354,
                  0.1512643329444101,
                  0.0030440475496016296,
                  0.23182161303428897,
                  0.00003854830096338984,
                  0.01502495595927897,
                  0.00003889558295405101,
                  0.015160315922876075,
                  0.00016425635615857924,
                  0.026788637869123822,
                  0.00017359794987375924,
                  0.028312162297699582,
                  0.0008164336950199063,
                  0.060558944822420434,
                  0.0008088460212743665,
                  0.05999612935009309,
                  0.01925106279557206,
                  0.17429720083660782,
                  0.02094455861717477,
                  0.18962994295418778,
              ]
          ),  # noqa: E231,E501
          "support": list(
              map(
                  lambda d: State(**d),
                  [
                      {"price": 10001, "valence": False},
                      {"price": 10001, "valence": True},
                      {"price": 10000, "valence": False},
                      {"price": 10000, "valence": True},
                      {"price": 5001, "valence": False},
                      {"price": 5001, "valence": True},
                      {"price": 5000, "valence": False},
                      {"price": 5000, "valence": True},
                      {"price": 1001, "valence": False},
                      {"price": 1001, "valence": True},
                      {"price": 1000, "valence": False},
                      {"price": 1000, "valence": True},
                      {"price": 501, "valence": False},
                      {"price": 501, "valence": True},
                      {"price": 500, "valence": False},
                      {"price": 500, "valence": True},
                      {"price": 51, "valence": False},
                      {"price": 51, "valence": True},
                      {"price": 50, "valence": False},
                      {"price": 50, "valence": True},
                  ],
              )
          ),  # noqa: E231,E501
      }
  
      pragmatic_marginal = pragmatic_listener(10000)
      for i, elt in enumerate(true_vals["support"]):
          print(
              "{}: true prob {} pyro prob {}".format(
                  elt,
                  true_vals["probs"][i].item(),
                  pragmatic_marginal.log_prob(elt).exp().item(),
              )
          )
  
file_path: pyro/examples/rsa/hyperbole.py
imports: import argparse
  import collections
  import torch
  from search_inference import HashingMarginal, Search, memoize
  import pyro
  import pyro.distributions
  import pyro.poutine
label_desc: Use image node_id 12 for calling a global function with example usage: test_truth() without return types