class_docstr: Combines two constraints interleaved elementwise by a mask.
  
  :param torch.Tensor mask: boolean mask tensor (of dtype ``torch.bool``)
  :param torch.constraints.Constraint constraint0: constraint that holds
      wherever ``mask == 0``
  :param torch.constraints.Constraint constraint1: constraint that holds
      wherever ``mask == 1``
class_docstr_tok: ["Combines","two","constraints","interleaved","elementwise","by","a","mask",".",":","param","torch.Tensor","mask",":","boolean","mask","tensor","(","of","dtype","``","torch.bool","``",")",":","param","torch.constraints.Constraint","constraint0",":","constraint","that","holds","wherever","``","mask","==","0","``",":","param","torch.constraints.Constraint","constraint1",":","constraint","that","holds","wherever","``","mask","==","1","``"]
code: def __init__(self, mask, constraint0, constraint1):
      self.mask = mask
      self.constraint0 = constraint0
      self.constraint1 = constraint1
  
file_path: pyro/pyro/distributions/mixture.py
imports: import torch
  from torch.distributions import constraints
  from torch.distributions.utils import lazy_property
  from pyro.distributions.torch_distribution import TorchDistribution
  from pyro.distributions.util import broadcast_shape
label_desc: Use image node_id 1 to create a new MaskedConstraint object from inherited base classes: constraints with example: obj = MaskedConstraint(mask, constraint0, constraint1)