parse pytest nodeid
minor import refactoring
extract TestCase and function docstrings