class_docstr: Create a binomial distribution object.
  
  Parameters
  ----------
  n : scalar
      Non-negative interger of Bernoulli trials to stop.
  prob : Tensor or scalar, default None
      Probability of sampling `1`.
  logit : Tensor or scalar, default None
      The log-odds of sampling `1`.
code: def sample_n(self, size=None):
      logit = self.logit
      expanded_logit = np.repeat(
          np.expand_dims(logit, -1), int(self.n), -1
      )
      return npx.random.bernoulli(
          logit=expanded_logit, size=sample_n_shape_converter(size)
      ).sum(-1)
  
file_path: mxnet/python/mxnet/gluon/probability/distributions/binomial.py
imports: from .distribution import Distribution
  from .utils import prob2logit, logit2prob, cached_property, sample_n_shape_converter
  from .utils import gammaln
  from .constraint import Interval, Real, NonNegativeInteger
  from ....None import np, npx
label_desc: Use image node_id 9 for calling the Binomial obj's underlying member method code with example usage: obj.sample_n(size) and returns: npx