code: def test_enum_discrete_iplate_plate_dependency_ok(
      subsampling, enumerate_
  ):
      def model():
          pyro.sample(
              "w", dist.Bernoulli(0.5), infer={"enumerate": "parallel"}
          )
          inner_plate = pyro.plate(
              "plate", 10, subsample_size=4 if subsampling else None
          )
          for i in pyro.plate(
              "iplate",
              10,
              subsample=torch.arange(3) if subsampling else None,
          ):
              pyro.sample("y_{}".format(i), dist.Bernoulli(0.5))
              with inner_plate:
                  pyro.sample(
                      "x_{}".format(i),
                      dist.Bernoulli(0.5),
                      infer={"enumerate": enumerate_},
                  )
  
      assert_ok(model, max_plate_nesting=1)
  
file_path: pyro/tests/contrib/funsor/test_valid_models_sequential_plate.py
imports: import logging
  import pytest
  import torch
  from pyro.ops.indexing import Vindex
label_desc: Use image node_id 1 for calling a global function with example usage: test_enum_discrete_iplate_plate_dependency_ok(subsampling, enumerate_) without return types