code: def plate_model(subsample_size):
      loc = torch.zeros(20)
      scale = torch.ones(20)
      with pyro.plate("plate", 20, subsample_size) as batch:
          pyro.sample("x", dist.Normal(loc[batch], scale[batch]))
          result = list(batch.data)
      return result
  
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 2 for calling a global function with example usage: plate_model(subsample_size) and returns: result