code: def test_find_MAP_warning_non_free_RVs():
      with pm.Model() as m:
          x = pm.Normal("x")
          y = pm.Normal("y")
          det = pm.Deterministic("det", x + y)
          pm.Normal("z", det, 1e-5, observed=100)
  
          msg = "Intermediate variables (such as Deterministic or Potential) were passed"
          with pytest.warns(UserWarning, match=re.escape(msg)):
              r = pm.find_MAP(vars=[det])
          assert_allclose([r["x"], r["y"], r["det"]], [50, 50, 100])
  
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 10 for calling a global function with example usage: test_find_MAP_warning_non_free_RVs() without return types