code: def sigmoid_example(design):
      n = design.shape[-2]
      random_effect_k = pyro.sample(
          "k", dist.Gamma(2.0 * torch.ones(n), torch.tensor(2.0))
      )
      random_effect_offset = pyro.sample(
          "w2", dist.Normal(torch.tensor(0.0), torch.ones(n))
      )
      w1 = pyro.sample(
          "w1",
          dist.Normal(
              torch.tensor([1.0, -1.0]), torch.tensor([10.0, 10.0])
          ).to_event(1),
      )
      mean = torch.matmul(design[..., :-2], w1.unsqueeze(-1)).squeeze(
          -1
      )
      offset_mean = mean + random_effect_offset
  
      base_dist = dist.Normal(offset_mean, torch.tensor(1.0)).to_event(
          1
      )
      transforms = [
          AffineTransform(loc=torch.tensor(0.0), scale=random_effect_k),
          SigmoidTransform(),
      ]
      response_dist = dist.TransformedDistribution(
          base_dist, transforms
      )
      y = pyro.sample("y", response_dist)
      return y
  
file_path: pyro/tests/contrib/oed/test_glmm.py
imports: import pytest
  import torch
  from torch.distributions.transforms import AffineTransform, SigmoidTransform
  import pyro
  import pyro.distributions
  import pyro.poutine
  from pyro.contrib.oed.glmm import group_linear_model, known_covariance_linear_model, logistic_regression_model, normal_inverse_gamma_linear_model, sigmoid_model, zero_mean_unit_obs_sd_lm
  from tests.common import assert_equal
label_desc: Use image node_id 6 for calling a global function with example usage: sigmoid_example(design) and returns: y