code: def test_replay(model, subsample_size):
      pyro.set_rng_seed(0)
  
      traced_model = poutine.trace(model)
      original = traced_model(subsample_size)
  
      replayed = poutine.replay(model, trace=traced_model.trace)(
          subsample_size
      )
      assert replayed == original
  
      if subsample_size < 20:
          different = traced_model(subsample_size)
          assert different != original
  
file_path: pyro/tests/poutine/test_mapdata.py
imports: import logging
  import pytest
  import torch
  import pyro
  import pyro.distributions
  import pyro.poutine
  from tests.common import requires_cuda
label_desc: Use image node_id 6 for calling a global function with example usage: test_replay(model, subsample_size) without return types