code: def test_enum_discrete_non_enumerated_plate_ok(enumerate_):
      def model():
          pyro.sample(
              "w", dist.Bernoulli(0.5), infer={"enumerate": "parallel"}
          )
  
          with pyro.plate("non_enum", 2):
              a = pyro.sample(
                  "a", dist.Bernoulli(0.5), infer={"enumerate": None}
              )
  
          p = (1.0 + a.sum(-1)) / (
              2.0 + a.shape[0]
          )  # introduce dependency of b on a
  
          with pyro.plate("enum_1", 3):
              pyro.sample(
                  "b",
                  dist.Bernoulli(p),
                  infer={"enumerate": enumerate_},
              )
  
      assert_ok(model, max_plate_nesting=1)
  
file_path: pyro/tests/contrib/funsor/test_valid_models_plate.py
imports: import logging
  import pytest
  import torch
  from pyro.ops.indexing import Vindex
  from tests.common import xfail_param
label_desc: Use image node_id 1 for calling a global function with example usage: test_enum_discrete_non_enumerated_plate_ok(enumerate_) without return types