code: def test_find_MAP_issue_4488():
      # Test for https://github.com/pymc-devs/pymc/issues/4488
      with pm.Model() as m:
          with pytest.warns(ImputationWarning):
              x = pm.Gamma(
                  "x", alpha=3, beta=10, observed=np.array([1, np.nan])
              )
          y = pm.Deterministic("y", x + 1)
          map_estimate = find_MAP()
  
      assert not set.difference(
          {"x_unobserved", "x_unobserved_log__", "y"},
          set(map_estimate.keys()),
      )
      assert_allclose(
          map_estimate["x_unobserved"], 0.2, rtol=1e-4, atol=1e-4
      )
      assert_allclose(
          map_estimate["y"], [2.0, map_estimate["x_unobserved"][0] + 1]
      )
  
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 9 for calling a global function with example usage: test_find_MAP_issue_4488() without return types