code: def bernoulli_reference_implementation(x, dtype):  # type: ignore
      # binomial n = 1 equal bernoulli
      # This example and test-case is for informational purpose. The generator operator is
      # non-deterministic and may not produce the same values in different implementations
      # even if a seed is specified.
      return np.random.binomial(1, p=x).astype(dtype)
  
file_path: onnx/onnx/backend/test/case/node/bernoulli.py
imports: import numpy
  import onnx
  from onnx.backend.test.case.base import Base
  from onnx.backend.test.case.node import expect
label_desc: Use image node_id 1 for calling a global function with example usage: bernoulli_reference_implementation(x, dtype) and returns: np