class_docstr: Zero-inflated Binomial log-likelihood.
  
  The pmf of this distribution is
  
  .. math::
  
      f(x \mid \psi, n, p) = \left\{ \begin{array}{l}
          (1-\psi) + \psi (1-p)^{n}, \text{if } x = 0 \\
          \psi {n \choose x} p^x (1-p)^{n-x}, \text{if } x=1,2,3,\ldots,n
          \end{array} \right.
  
  .. plot::
      :context: close-figs
  
      import matplotlib.pyplot as plt
      import numpy as np
      import scipy.stats as st
      import arviz as az
      plt.style.use('arviz-darkgrid')
      x = np.arange(0, 25)
      ns = [10, 20]
      ps = [0.5, 0.7]
      psis = [0.7, 0.4]
      for n, p, psi in zip(ns, ps, psis):
          pmf = st.binom.pmf(x, n, p)
          pmf[0] = (1 - psi) + pmf[0]
          pmf[1:] =  psi * pmf[1:]
          pmf /= pmf.sum()
          plt.plot(x, pmf, '-o', label='n = {}, p = {}, $\\psi$ = {}'.format(n, p, psi))
      plt.xlabel('x', fontsize=12)
      plt.ylabel('f(x)', fontsize=12)
      plt.legend(loc=1)
      plt.show()
  
  ========  ==========================
  Support   :math:`x \in \mathbb{N}_0`
  Mean      :math:`\psi n p`
  Variance  :math:`(1-\psi) n p [1 - p(1 - \psi n)].`
  ========  ==========================
  
  Parameters
  ----------
  psi : tensor_like of float
      Expected proportion of Binomial variates (0 < psi < 1)
  n : tensor_like of int
      Number of Bernoulli trials (n >= 0).
  p : tensor_like of float
      Probability of success in each trial (0 < p < 1).
class_docstr_tok: ["Zero-inflated","Binomial","log-likelihood",".","The","pmf","of","this","distribution","is","..","math",":",":","f","(","x","\\mid","\\psi",",","n",",","p",")","=","\\left\\","{","\\begin","{","array","}","{","l","}","(","1-\\psi",")","+","\\psi","(","1-p",")","^","{","n","}",",","\\text","{","if","}","x","=","0","\\\\","\\psi","{","n","\\choose","x","}","p^x","(","1-p",")","^","{","n-x","}",",","\\text","{","if","}","x=1,2,3",",","\\ldots",",","n","\\end","{","array","}","\\right",".","..","plot",":",":",":","context",":","close-figs","import","matplotlib.pyplot","as","plt","import","numpy","as","np","import","scipy.stats","as","st","import","arviz","as","az","plt.style.use","(","'arviz-darkgrid","'",")","x","=","np.arange","(","0",",","25",")","ns","=","[","10",",","20","]","ps","=","[","0.5",",","0.7","]","psis","=","[","0.7",",","0.4","]","for","n",",","p",",","psi","in","zip","(","ns",",","ps",",","psis",")",":","pmf","=","st.binom.pmf","(","x",",","n",",","p",")","pmf","[","0","]","=","(","1","-","psi",")","+","pmf","[","0","]","pmf","[","1",":","]","=","psi","*","pmf","[","1",":","]","pmf","\/=","pmf.sum","(",")","plt.plot","(","x",",","pmf",",","'-o","'",",","label='n","=","{","}",",","p","=","{","}",",","$","\\\\psi","$","=","{","}","'.format","(","n",",","p",",","psi",")",")","plt.xlabel","(","'","x","'",",","fontsize=12",")","plt.ylabel","(","'","f","(","x",")","'",",","fontsize=12",")","plt.legend","(","loc=1",")","plt.show","(",")","========","==========================","Support",":","math",":","`","x","\\in","\\mathbb","{","N","}","_0","`","Mean",":","math",":","`","\\psi","n","p","`","Variance",":","math",":","`","(","1-\\psi",")","n","p","[","1","-","p","(","1","-","\\psi","n",")","]",".","`","========","==========================","Parameters","--","--","--","--","--","psi",":","tensor_like","of","float","Expected","proportion","of","Binomial","variates","(","0","<","psi","<","1",")","n",":","tensor_like","of","int","Number","of","Bernoulli","trials","(","n",">","=","0",")",".","p",":","tensor_like","of","float","Probability","of","success","in","each","trial","(","0","<","p","<","1",")","."]
code: def dist(cls, psi, n, p, **kwargs):
      return _zero_inflated_mixture(
          name=None,
          nonzero_p=psi,
          nonzero_dist=Binomial.dist(n=n, p=p),
          **kwargs,
      )
  
imports: import warnings
  import numpy
  import pytensor
  import pytensor.tensor
  from pytensor.graph.basic import Node, equal_computations
  from pytensor.tensor import TensorVariable
  from pytensor.tensor.random.op import RandomVariable
  from pymc.distributions import transforms
  from pymc.distributions.continuous import Gamma, LogNormal, Normal, get_tau_sigma
  from pymc.distributions.discrete import Binomial, NegativeBinomial, Poisson
  from pymc.distributions.dist_math import check_parameters
  from pymc.distributions.distribution import DiracDelta, Distribution, SymbolicRandomVariable, _moment, moment
  from pymc.distributions.shape_utils import _change_dist_size, change_dist_size
  from pymc.distributions.transforms import _default_transform
  from pymc.distributions.truncated import Truncated
  from pymc.logprob.abstract import _logcdf, _logcdf_helper, _logprob
  from pymc.logprob.basic import logp
  from pymc.logprob.transforms import IntervalTransform
  from pymc.pytensorf import floatX
  from pymc.util import check_dist_not_registered
  from pymc.vartypes import continuous_types, discrete_types
label_desc: Use image node_id 2 for calling the ZeroInflatedBinomial obj's underlying member method code with example usage: obj.dist(cls, psi, n, p) and returns: _zero_inflated_mixture