code: def negative_binomial_like(x, mu, alpha):
      R
      alpha = np.array(alpha)
      if (alpha > 1e10).any():
          if (alpha > 1e10).all():
              # Return Poisson when alpha gets very large
              return flib.poisson(x, mu)
  
          # Split big and small dispersion values
          big = alpha > 1e10
          return flib.poisson(x[big], mu[big]) + flib.negbin2(x[big - True],
                                                              mu[big - True], alpha[big - True])
      return flib.negbin2(x, mu, alpha)
docs: R"""
      Negative binomial log-likelihood.
  
      The negative binomial
      distribution describes a Poisson random variable whose rate
      parameter is gamma distributed. PyMC's chosen parameterization is
      based on this mixture interpretation.
  
      .. math::
          f(x \mid \mu, \alpha) = \frac{\Gamma(x+\alpha)}{x! \Gamma(\alpha)} (\alpha/(\mu+\alpha))^\alpha (\mu/(\mu+\alpha))^x
  
      :Parameters:
        - `x` : x = 0,1,2,...
        - `mu` : mu > 0
        - `alpha` : alpha > 0
  
      .. note::
        - :math:`E[x]=\mu`
        - In Wikipedia's parameterization,
          :math:`r=\alpha`,
          :math:`p=\mu/(\mu+\alpha)`,
          :math:`\mu=rp/(1-p)`