code: def sample(self, mu):
          
          number_of_trials = self.levels
          success_probability = mu / number_of_trials
          return np.random.binomial(n=number_of_trials, p=success_probability,
                                    size=None)
docs: Return random samples from this Normal distribution.
  
          Parameters
          ----------
          mu : array-like of shape n_samples or shape (n_simulations, n_samples)
              expected values
  
          Returns
          -------
          random_samples : np.array of same shape as mu