code: def test_bernoulli(x: float, p: float) -> None:
      gpf = logdensities.bernoulli(x, p).numpy()
      sps = scipy.stats.bernoulli.logpmf(k=x, p=p)
      np.testing.assert_allclose(gpf, sps)
  
file_path: GPflow/tests/gpflow/test_logdensities.py
imports: import numpy
  import pytest
  import scipy.stats
  from numpy.random import randn
  from numpy.testing import assert_allclose
  from scipy.stats import multivariate_normal
  from gpflow import logdensities
  from gpflow.base import AnyNDArray
  from gpflow.utilities import to_default_float
label_desc: Use image node_id 3 for calling a global function with example usage: test_bernoulli(x, p) without return types