code: def test_inflated_neg_binomial_likelihood(
      mu: float,
      alpha: float,
      zero_probability: float,
      hybridize: bool,
  ) -> None:
      """
      Test to check that maximizing the likelihood recovers the parameters
      """
  
      # generate samples
      num_samples = 2000  # Required for convergence
  
      distr = ZeroInflatedNegativeBinomialOutput().distribution(
          distr_args=[
              mx.nd.array(
                  [[1 - zero_probability, zero_probability]]
              ),  # mixture probs
              mx.nd.array([mu, alpha]),  # loc, shape of Neg Bin
              mx.nd.array([0.0]),
          ]
      )
      distr_output = ZeroInflatedNegativeBinomialOutput()
  
      samples = distr.sample(num_samples).squeeze()
  
      init_biases = None
  
      (
          (_, zero_probability_hat),
          mu_hat,
          alpha_hat,
          _,
      ) = maximum_likelihood_estimate_sgd(
          distr_output=distr_output,
          samples=samples,
          init_biases=init_biases,
          hybridize=hybridize,
          learning_rate=PositiveFloat(0.1),
          num_epochs=PositiveInt(20),
      )
  
      assert (
          np.abs(zero_probability_hat - zero_probability)
          < TOL * zero_probability
      ), f"zero_probability did not match: zero_probability = {zero_probability}, zero_probability_hat = {zero_probability_hat}"
  
      assert (
          np.abs(mu_hat - mu) < TOL * mu
      ), f"mu did not match: mu = {mu}, mu_hat = {mu_hat}"
  
      assert (
          np.abs(alpha_hat - alpha) < TOL * alpha
      ), f"alpha did not match: alpha = {alpha}, alpha_hat = {alpha_hat}"
  
imports: from functools import reduce
  from typing import List, Tuple
  import mxnet
  import numpy
  import pytest
  from gluonts.mx.model.tpp.distribution import Loglogistic, LoglogisticOutput, Weibull, WeibullOutput
  from gluonts.mx.distribution import Beta, BetaOutput, Binned, BinnedOutput, Categorical, CategoricalOutput, Dirichlet, DirichletMultinomial, DirichletMultinomialOutput, DirichletOutput, DistributionOutput, EmpiricalDistributionOutput, Gamma, GammaOutput, Gaussian, GaussianOutput, GenPareto, GenParetoOutput, Laplace, LaplaceOutput, LogitNormal, LogitNormalOutput, LowrankMultivariateGaussian, LowrankMultivariateGaussianOutput, MultivariateGaussian, MultivariateGaussianOutput, NegativeBinomial, NegativeBinomialOutput, OneInflatedBeta, OneInflatedBetaOutput, PiecewiseLinear, PiecewiseLinearOutput, Poisson, PoissonOutput, StudentT, StudentTOutput, ZeroAndOneInflatedBeta, ZeroAndOneInflatedBetaOutput, ZeroInflatedBeta, ZeroInflatedBetaOutput, ZeroInflatedNegativeBinomialOutput, ZeroInflatedPoissonOutput
  from gluonts.mx.distribution.box_cox_transform import InverseBoxCoxTransform, InverseBoxCoxTransformOutput
  from gluonts.mx.distribution.transformed_distribution import TransformedDistribution
  from gluonts.mx.distribution.transformed_distribution_output import TransformedDistributionOutput
  from gluonts.pydantic import PositiveFloat, PositiveInt
label_desc: Use image node_id 27 for calling a global function with example usage: test_inflated_neg_binomial_likelihood(mu, alpha, zero_probability, hybridize) without return types