code: def test_call_passing():
      class P1(object):
          @hookimpl
          def m(self, __multicall__, x):
              assert len(__multicall__.results) == 1
              assert not __multicall__.hook_impls
              return 17
  
      class P2(object):
          @hookimpl
          def m(self, __multicall__, x):
              assert __multicall__.results == []
              assert __multicall__.hook_impls
              return 23
  
      p1 = P1()
      p2 = P2()
      reslist = MC([p1.m, p2.m], {"x": 23})
      assert len(reslist) == 2
      # ensure reversed order
      assert reslist == [23, 17]
  
file_path: catboost/contrib/python/pluggy/py2/tests/test_multicall.py
imports: import pytest
  from pluggy import HookCallError, HookspecMarker, HookimplMarker
  from pluggy.hooks import HookImpl
  from pluggy.callers import _multicall, _legacymulticall
label_desc: Use image node_id 2 for calling a global function with example usage: test_call_passing() and returns: int, int