code: def negbinom(u, mu, scale):
      p = (scale - 1) / scale
      r = mu * (1 - p) / p
      x = np.random.gamma(r, p / (1 - p), len(u))
      return poisson.ppf(u, mu=x)
  
imports: import pandas
  import numpy
  from scipy.stats.distributions import norm, poisson
  import statsmodels.api
  import matplotlib.pyplot
label_desc: Use image node_id 1 for calling a global function with example usage: negbinom(u, mu, scale) and returns: poisson