code: def model_10(data, history, vectorized):
      init_probs = torch.tensor([0.5, 0.5])
      transition_probs = pyro.param(
          "transition_probs",
          torch.tensor([[0.75, 0.25], [0.25, 0.75]]),
          constraint=constraints.simplex,
      )
      emission_probs = pyro.param(
          "emission_probs",
          torch.tensor([[0.75, 0.25], [0.25, 0.75]]),
          constraint=constraints.simplex,
      )
      x = None
      markov_loop = (
          pyro.vectorized_markov(
              name="time", size=len(data), history=history
          )
          if vectorized
          else pyro.markov(range(len(data)), history=history)
      )
      for i in markov_loop:
          probs = init_probs if x is None else transition_probs[x]
          x = pyro.sample("x_{}".format(i), dist.Categorical(probs))
          pyro.sample(
              "y_{}".format(i),
              dist.Categorical(emission_probs[x]),
              obs=data[i],
          )
  
imports: import pytest
  import torch
  from pyroapi import pyro_backend
  from torch.distributions import constraints
  from pyro.ops.indexing import Vindex
label_desc: Use image node_id 17 for calling a global function with example usage: model_10(data, history, vectorized) without return types