class_docstr: Generic Zero Inflated distribution.
  
  This can be used directly or can be used as a base class as e.g. for
  :class:`ZeroInflatedPoisson` and :class:`ZeroInflatedNegativeBinomial`.
  
  :param torch.Tensor gate: probability of extra zeros given via a Bernoulli distribution.
  :param TorchDistribution base_dist: the base distribution.
code: def log_prob(self, value):
      if self._validate_args:
          self._validate_sample(value)
  
      gate, value = broadcast_all(self.gate, value)
      log_prob = (-gate).log1p() + self.base_dist.log_prob(value)
      log_prob = torch.where(
          value == 0, (gate + log_prob.exp()).log(), log_prob
      )
      return log_prob
  
imports: import torch
  from torch.distributions import constraints, NegativeBinomial, Poisson, Distribution
  from torch.distributions.utils import broadcast_all, lazy_property
  from .utils import broadcast_shape
label_desc: Use image node_id 3 for calling the ZeroInflatedDistribution obj's underlying member method code with example usage: obj.log_prob(value) and returns: log_prob