def getnode(self, config, arg):
session = Session(config)<EOL>assert "<STR_LIT>" not in str(arg)<EOL>p = py.path.local(arg)<EOL>config.hook.pytest_sessionstart(session=session)<EOL>res = session.perform_collect([str(p)], genitems=False)[<NUM_LIT:0>]<EOL>config.hook.pytest_sessionfinish(session=session, exitstatus=EXIT_OK)<EOL>return res<EOL>
Return the collection node of a file.

        :param config: :py:class:`_pytest.config.Config` instance, see
           :py:meth:`parseconfig` and :py:meth:`parseconfigure` to create the
           configuration

        :param arg: a :py:class:`py.path.local` instance of the file