code: def geometric(p, size=None):
      if p < 0 or p > 1:
          raise ValueError("p must be in the interval [0, 1]")
      oneMinusP = ivy.subtract(1, p)
      sizeMinusOne = ivy.subtract(size, 1)
  
      return ivy.multiply(ivy.pow(oneMinusP, sizeMinusOne), p)
  
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 9 for calling a global function with example usage: geometric(p, size) and returns: ivy