code: def EvalPoissonPmf(k, lam):
      
      # don't use the scipy function (yet).  for lam=0 it returns NaN;
      # should be 0.0
      # return scipy.stats.poisson.pmf(k, lam)
  
      return lam ** k * math.exp(-lam) / math.factorial(k)
docs: Computes the Poisson PMF.
  
      k: number of events
      lam: parameter lambda in events per unit time
  
      returns: float probability