def module(self):
        """Python module object this node was collected from (can be None)."""
        node = self.getparent(Module)
        return node.obj if node is not None else None
Python module object this node was collected from (can be None).
src/_pytest/python.py