code: def binomial(n, p, size=None):
      if p < 0 or p > 1:
          raise ValueError("p must be in the interval (0, 1)")
      if n < 0:
          raise ValueError("n must be strictly positive")
      if size is None:
          size = 1
      else:
          size = size
      if isinstance(size, int):
          size = (size,)
      lambda_ = ivy.multiply(n, p)
      return ivy.poisson(lambda_, shape=size)
  
imports: import ivy
  from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back, from_zero_dim_arrays_to_scalar
  from ivy import with_supported_dtypes
label_desc: Use image node_id 2 for calling a global function with example usage: binomial(n, p, size) and returns: ivy