code: def generate_data(num_data, feature_dim):
      z = dist.Bernoulli(0.5).sample([num_data])
      x = dist.Normal(z, 5 * z + 3 * (1 - z)).sample([feature_dim]).t()
      t = dist.Bernoulli(0.75 * z + 0.25 * (1 - z)).sample()
      y = dist.Bernoulli(logits=3 * (z + 2 * (2 * t - 2))).sample()
      return x, t, y
  
file_path: pyro/tests/contrib/cevae/test_cevae.py
imports: import io
  import warnings
  import pytest
  import torch
  import pyro
  import pyro.distributions
  from pyro.contrib.cevae import CEVAE, DistributionNet
  from tests.common import assert_close
label_desc: Use image node_id 1 for calling a global function with example usage: generate_data(num_data, feature_dim) and returns: x,  t,  y