code: def test_find_MAP_discrete():
      tol1 = 2.0**-11
      tol2 = 2.0**-6
      alpha = 4
      beta = 4
      n = 20
      yes = 15
  
      with pm.Model() as model:
          p = pm.Beta("p", alpha, beta)
          pm.Binomial("ss", n=n, p=p)
          pm.Binomial("s", n=n, p=p, observed=yes)
  
          map_est1 = find_MAP()
          map_est2 = find_MAP(vars=model.value_vars)
  
      assert_allclose(
          map_est1["p"], 0.6086956533498806, atol=tol1, rtol=0
      )
  
      assert_allclose(
          map_est2["p"], 0.695642178810167, atol=tol2, rtol=0
      )
      assert map_est2["ss"] == 14
  
imports: import re
  import numpy
  import pytest
  from numpy.testing import assert_allclose
  import pymc
  from pymc.exceptions import ImputationWarning
  from pymc.step_methods.metropolis import tune
  from pymc.testing import select_by_precision
  from pymc.tuning import find_MAP
  from tests import models
  from tests.models import non_normal, simple_arbitrary_det, simple_model
label_desc: Use image node_id 5 for calling a global function with example usage: test_find_MAP_discrete() without return types