code: def test_map_default(self):
      with self.test_session() as sess:
          x = Gamma(2.0, 0.5)
  
          inference = ed.MAP([x])
          inference.initialize(auto_transform=True, n_iter=500)
          tf.global_variables_initializer().run()
          for _ in range(inference.n_iter):
              info_dict = inference.update()
  
          # Check approximation on constrained space has same mode as
          # target distribution.
          qx = inference.latent_vars[x]
          stats = sess.run([x.mode(), qx])
          self.assertAllClose(stats[0], stats[1], rtol=1e-5, atol=1e-5)
  
file_path: edward/tests/inferences/inference_auto_transform_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import edward
  import numpy
  import tensorflow
  from edward.models import Empirical, Gamma, Normal, PointMass, TransformedDistribution, Beta, Bernoulli
  from edward.util import transform
  from tensorflow.contrib.distributions import bijectors
label_desc: Use image node_id 4 for calling the test_inference_auto_transform_class obj's underlying member method code with example usage: obj.test_map_default() without return types