def path_dispatch2(mname, first_argname, returns_model):
def _wrapper(self, *args, **kwargs):<EOL><INDENT>other, args = _get_arg(first_argname, args, kwargs)<EOL>path, args = _get_arg('<STR_LIT:path>', args, kwargs)<EOL>prefix, mgr, mgr_path = _resolve_path(path, self.managers)<EOL>result = getattr(mgr, mname)(other, mgr_path, *args, **kwargs)<EOL>if returns_model and prefix:<EOL><INDENT>return _apply_prefix(prefix, result)<EOL><DEDENT>else:<EOL><INDENT>return result<EOL><DEDENT><DEDENT>return _wrapper<EOL>
Decorator for methods that accept path as a second argument.