code: def test_two_plugins(monkeypatch, capsys, normal_posterior):
      """Make sure that both plugins are used."""
  
      def mock_iter_entry_points(group):
          return iter([MockEntryPoint, OtherMockEntryPoint])
  
      monkeypatch.setattr(
          pkg_resources, "iter_entry_points", mock_iter_entry_points
      )
  
      fit = normal_posterior.sample(stepsize=0.001)
      assert fit is not None and "y" in fit
  
      captured = capsys.readouterr()
      assert "In DummyPlugin" in captured.out
      assert "In OtherDummyPlugin" in captured.out
  
file_path: pystan/tests/test_plugins.py
imports: import pkg_resources
  import pytest
  import stan
  import stan.plugins
label_desc: Use image node_id 5 for calling a global function with example usage: test_two_plugins(monkeypatch, capsys, normal_posterior) and returns: iter