code: def bernoulli(
      probs: Union[float, JaxArray],
      *,
      logits: Optional[Union[float, JaxArray]] = None,
      shape: Optional[Union[ivy.NativeArray, Sequence[int]]] = None,
      device: Optional[jaxlib.xla_extension.Device] = None,
      dtype: Optional[jnp.dtype] = None,
      seed: Optional[int] = None,
      out: Optional[JaxArray] = None,
  ) -> JaxArray:
      if seed:
          rng_input = jax.random.PRNGKey(seed)
      else:
          RNG_, rng_input = jax.random.split(_getRNG())
          _setRNG(RNG_)
      if logits is not None:
          probs = jax.nn.softmax(logits, axis=-1)
      if hasattr(probs, "shape") and not _check_shapes_broadcastable(
          shape, probs.shape
      ):
          shape = probs.shape
      return jax.random.bernoulli(rng_input, probs, shape=shape)
  
file_path: ivy/ivy/functional/backends/jax/experimental/random.py
imports: from typing import Optional, Union, Sequence
  import jax.numpy
  import jax
  import jaxlib.xla_extension
  import ivy
  from ivy.functional.backends.jax import JaxArray
  from ivy.functional.backends.jax.random import RNG, _setRNG, _getRNG
  from ivy.functional.ivy.random import _check_bounds_and_get_shape, _check_shapes_broadcastable
  from ivy.func_wrapper import with_unsupported_dtypes
  from ..None import backend_version
label_desc: Use image node_id 5 for calling a global function with example usage: bernoulli(probs) and returns: jax