code: def test_logit_map_crossed_formula():
      data = gen_crossed_logit_pandas(10, 10, 1, 0.5)
  
      fml = "y ~ fe"
      fml_vc = {"a": "0 + C(a)", "b": "0 + C(b)"}
      glmm = BinomialBayesMixedGLM.from_formula(
          fml, fml_vc, data, vcp_p=0.5
      )
      rslt = glmm.fit_map()
  
      assert_allclose(
          glmm.logposterior_grad(rslt.params),
          np.zeros_like(rslt.params),
          atol=1e-4,
      )
      rslt.summary()
  
      r = rslt.random_effects("a")
      assert_allclose(
          r.iloc[0, :].values, np.r_[-0.02004904, 0.094014], atol=1e-4
      )
  
      # Check dimensions and PSD status of cov_params
      cm = rslt.cov_params()
      p = rslt.params.shape[0]
      assert_equal(list(cm.shape), [p, p])
      np.linalg.cholesky(cm)
  
imports: import numpy
  from statsmodels.genmod.bayes_mixed_glm import BinomialBayesMixedGLM, PoissonBayesMixedGLM
  import pandas
  from scipy import sparse
  from numpy.testing import assert_allclose, assert_equal
  from scipy.optimize import approx_fprime
label_desc: Use image node_id 10 for calling a global function with example usage: test_logit_map_crossed_formula() without return types